logger

package
v0.0.0-...-7afedfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, fields ...interface{})
	Info(msg string, fields ...interface{})
	Error(msg string, fields ...interface{})
	Fatal(msg string, fields ...interface{})
	Panic(msg string, fields ...interface{})
}

Logger is the wrapper

type LoggerCfg

type LoggerCfg struct {
	Name       string `json:"name"`
	Maxsize    int    `json:"maxsize"`
	Maxbackups int    `json:"maxbackups"`
	Maxage     int    `json:"maxage"`
	Compress   bool   `json:"compress"`
	Level      int    `json:"level"`
}

type StdLogger

type StdLogger struct {
	Logger
	// contains filtered or unexported fields
}

StdLogger is struct

func GetInstance

func GetInstance(tag string, cfg []*LoggerCfg) (*StdLogger, error)

func NewStdLogger

func NewStdLogger() *StdLogger

NewStdLogger is

func (*StdLogger) Debug

func (l *StdLogger) Debug(msg string, fields ...interface{})

Debug is for log warning level

func (*StdLogger) Error

func (l *StdLogger) Error(msg string, fields ...interface{})

Error is for log warning level

func (*StdLogger) Fatal

func (l *StdLogger) Fatal(msg string, fields ...interface{})

Fatal is for log warning level

func (*StdLogger) Info

func (l *StdLogger) Info(msg string, fields ...interface{})

Info is for log warning level

func (*StdLogger) Panic

func (l *StdLogger) Panic(msg string, fields ...interface{})

Panic is for log warning level

func (*StdLogger) Warning

func (l *StdLogger) Warning(msg string, fields ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL