Versions in this module Expand all Collapse all v0 v0.6.0 Nov 27, 2021 Changes in this version + const FlavorConsole + const FlavorFileCapture + const FlavorFileStandard + const LevelDebug + const LevelError + const LevelInfo + const LevelQuiet + const LevelWarn + var ErrorCallerTestLineIsNotJSON = errors.New("line is not json format") + var ErrorCallerTestMessageNotFound = errors.New("test message not found in the output") + func AddDefaultSubscriber(l Logger) + func EnsureCallerSkip(l Logger, msgKey, callerKey string, fetchOut func() string) error + type Field interface + func Any(key string, val interface{}) Field + func Binary(key string, val []byte) Field + func Bool(key string, val bool) Field + func ByteString(key string, val []byte) Field + func Duration(key string, val time.Duration) Field + func Error(err error) Field + func Errors(key string, val []error) Field + func Float32(key string, val float32) Field + func Float64(key string, val float64) Field + func Int(key string, val int) Field + func Int16(key string, val int16) Field + func Int32(key string, val int32) Field + func Int64(key string, val int64) Field + func Int8(key string, val int8) Field + func String(key string, val string) Field + func Strings(key string, val []string) Field + func Time(key string, val time.Time) Field + func Uint(key string, val uint) Field + func Uint16(key string, val uint16) Field + func Uint32(key string, val uint32) Field + func Uint64(key string, val uint64) Field + func Uint8(key string, val uint8) Field + type Flavor int + type Level int + func ConsoleDefaultLevel() Level + type LogCloser interface + func NewLogCloser(level Level, flavor Flavor, w io.WriteCloser) LogCloser + type Logger interface + AddCallerSkip func(n int) Logger + Debug func(msg string, fields ...Field) + Error func(msg string, fields ...Field) + Info func(msg string, fields ...Field) + Sync func() error + Warn func(msg string, fields ...Field) + With func(fields ...Field) Logger + func Capture() Logger + func ConsoleOnly() Logger + func Default() Logger + func New(level Level, flavor Flavor, w io.Writer) Logger + type RootLogger interface + AddSubscriber func(l Logger) + Current func() Logger + RemoveSubscriber func(l Logger) + SetLevelConsole func(level Level) + type Tee interface + AddSubscriber func(l Logger) Tee + RemoveSubscriber func(l Logger) Tee + func NewTee() Tee