Documentation ¶
Overview ¶
Package zlog implements a log tool called zlog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebufLevel = func(level zapcore.Level) bool { return level == zap.DebugLevel } InfoLevel = func(level zapcore.Level) bool { return level == zap.InfoLevel } ErrorLevel = func(level zapcore.Level) bool { return level == zap.ErrorLevel } )
default log level
Functions ¶
func GetLogFilePath ¶
logFile logger file out path
Types ¶
type Logger ¶
type Logger struct { Path string `json:"path" toml:"toml"` // log file path MaxSize int `json:"maxSize" toml:"maxSize"` // log file max size MaxBackups int `json:"maxBackups" toml:"maxBackups"` // log file max backups MaxAge int `json:"maxAge" toml:"maxAge"` // log file max save day Compress bool `json:"compress" toml:"compress"` // log file whether to compress Log *zap.SugaredLogger // zap log object // contains filtered or unexported fields }
Logger
type LoggerInterface ¶
type LoggerInterface interface {
Generate(LogMap) // Generate logger core
}
LoggerInterface
Click to show internal directories.
Click to hide internal directories.