Documentation ¶
Index ¶
- func AddHook(hook interface{}) error
- func Configure(config *Config, writer io.Writer)
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func GetRotatedWriter(config *Config) io.Writer
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetFormatter(formatter string)
- func SetLevel(level string)
- func SetReportCaller(reportCaller bool)
- func SetWriter(writer io.Writer)
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Traceln(args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- type Config
- type Fields
- type LogEntry
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRotatedWriter ¶
func SetFormatter ¶
func SetFormatter(formatter string)
func SetReportCaller ¶
func SetReportCaller(reportCaller bool)
Types ¶
type Config ¶
type Config struct { Base string `mapstructure:"base"` Level string `mapstructure:"level"` Format string `mapstructure:"format"` Enabled bool `mapstructure:"enabled"` MaxAge uint `mapstructure:"max_age"` // days MaxBackups uint `mapstructure:"max_backups"` MaxSize uint `mapstructure:"max_size"` // MBs Compress bool `mapstructure:"compress"` ReportCaller bool `mapstructure:"report_caller"` Filename string `mapstructure:"filename"` }
Config represents logger configuration
type LogEntry ¶
type LogEntry interface { Debug(...interface{}) Debugf(string, ...interface{}) Debugln(...interface{}) Error(...interface{}) Errorf(string, ...interface{}) Errorln(...interface{}) Fatal(...interface{}) Fatalf(string, ...interface{}) Fatalln(...interface{}) Info(...interface{}) Infof(string, ...interface{}) Infoln(...interface{}) Trace(...interface{}) Tracef(string, ...interface{}) Traceln(...interface{}) Panic(...interface{}) Panicf(string, ...interface{}) Panicln(...interface{}) Print(...interface{}) Printf(string, ...interface{}) Println(...interface{}) Warn(...interface{}) Warnf(string, ...interface{}) Warnln(...interface{}) WithField(string, interface{}) LogEntry WithFields(Fields) LogEntry WithContext(context.Context) LogEntry }
func WithContext ¶
func WithFields ¶
Click to show internal directories.
Click to hide internal directories.