Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keyAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keyAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keyAndValues ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keyAndValues ...interface{})
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keyAndValues ...interface{})
- func Revert()
- func SetLogger(l Logger)
- func SetupLog(wd string, cf LogConfig) error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keyAndValues ...interface{})
- type EncodeLevel
- type Level
- type LogConfig
- type Logger
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EncodeLevel ¶
type EncodeLevel int8
const ( Capital EncodeLevel = iota CapitalColor Lowercase LowercaseColor )
type LogConfig ¶
type LogConfig struct {
Level Level `json:"level" mapstructure:"level"`
Mode Mode `json:"mode" mapstructure:"mode"`
TimeFormat string `json:"time_format" mapstructure:"time_format"`
EncodeLevel EncodeLevel `json:"encode_level" mapstructure:"encode_level"`
Name string `json:"name" mapstructure:"name"`
MaxSize int `json:"max_size" mapstructure:"max_size"`
MaxAge int `json:"max_age" mapstructure:"max_age"`
MaxBackups int `json:"max_backups" mapstructure:"max_backups"`
Compress bool `json:"compress" mapstructure:"compress"`
}
type Logger ¶
type Logger interface {
Debug(...interface{})
Debugf(string, ...interface{})
Debugw(string, ...interface{})
Info(...interface{})
Infof(string, ...interface{})
Infow(string, ...interface{})
Warn(...interface{})
Warnf(string, ...interface{})
Warnw(string, ...interface{})
Error(...interface{})
Errorf(string, ...interface{})
Errorw(string, ...interface{})
Panic(...interface{})
Panicf(string, ...interface{})
Panicw(string, ...interface{})
Fatal(...interface{})
Fatalf(string, ...interface{})
Fatalw(string, ...interface{})
Skip(int) Logger // 返回溯源n层的Logger
PoolGet() interface{} // 从对象池中获取实际的Logger对象
PoolPut(interface{}) // 把实例对象放回对象池
}
Click to show internal directories.
Click to hide internal directories.