Documentation ¶
Index ¶
- Variables
- func Debug(message ...interface{})
- func Debugf(format string, message ...interface{})
- func Error(err error, message ...interface{})
- func Errorf(err error, format string, message ...interface{})
- func Fatal(err error, message ...interface{})
- func Fatalf(err error, format string, message ...interface{})
- func GetLogger() *logruslog.Logger
- func Info(message ...interface{})
- func Infof(format string, message ...interface{})
- func InitLogger(c *LogConf) error
- func SetWriter(c *LogConf)
- func Warn(err error, message ...interface{})
- func Warnf(err error, format string, message ...interface{})
- type LogConf
- type MyFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilLogger = errors.New("Logger is nil,please check the whether logger is init correct! ")
View Source
var (
LLogger *logruslog.Logger
)
Functions ¶
Types ¶
type LogConf ¶
type LogConf struct { // FileName 日志文件路径 FileName string `json:"fileName" yaml:"fileName"` // MaxSize 每个日志文件保存的最大尺寸 单位:M MaxSize int `json:"maxSize" yaml:"maxSize"` // MaxBackups 日志文件最多保存多少个备份 MaxBackups int `json:"maxBackups" yaml:"maxBackups"` // MaxAge 文件最多保存多少天 MaxAge int `json:"maxAge" yaml:"maxAge"` // Compress 是否压缩 Compress bool `json:"compress" yaml:"compress"` // Console 是否打印到控制台 Console bool `json:"console" yaml:"console"` }
Click to show internal directories.
Click to hide internal directories.