Versions in this module Expand all Collapse all v0 v0.21.1 Apr 1, 2019 Changes in this version + const ErrBadLevel + const ErrBadStackLevel + type BaseConfig struct + Level Level + StackLevel Level + func NewBaseConfig() *BaseConfig + type FileConfig struct + FileMode os.FileMode + Filename string + func NewFileConfig() *FileConfig + type Level string + const Debug + const Error + const Fatal + const Info + const Warning + type Logger interface + Add func(vars ...interface{}) Logger + Debug func(msg string) + Error func(msg string) + Fatal func(msg string) + Info func(msg string) + Log func(lvl Level, msg string) + Warn func(msg string) + func NewFileLogger(conf *FileConfig) (Logger, io.Closer, error) + func NewMultiLogger(loggers ...Logger) Logger + func NewStderrLogger(conf *WriterConfig) (Logger, error) + func NewTestLogger(conf *WriterConfig, verbose bool) (Logger, error) + func NewWriterLogger(conf *WriterConfig, out io.Writer) (Logger, error) + type LoggerBase struct + func NewLoggerBase(conf *BaseConfig, log LoggerFunc) (*LoggerBase, error) + func (l *LoggerBase) Add(vars ...interface{}) Logger + func (l *LoggerBase) Debug(msg string) + func (l *LoggerBase) Error(msg string) + func (l *LoggerBase) Fatal(msg string) + func (l *LoggerBase) Info(msg string) + func (l *LoggerBase) Log(lvl Level, msg string) + func (l *LoggerBase) Warn(msg string) + type LoggerFunc func(lvl Level, msg string, ctx map[string]interface{}, stack *string) error + type WriterConfig struct + Prefix string + UTC bool + func NewWriterConfig() *WriterConfig