Versions in this module Expand all Collapse all v2 v2.0.0 May 20, 2022 Changes in this version + var LongestScopeNameLength int + func AddOutput(minLevel Level, sink Sink) + func ClearOutputs() + func NewWriter(log Logger, level Level) io.Writer + func SetLevel(level Level) + func SetLevelScoped(level Level, scope string) + type Context interface + AppendBool func(key string, value bool) Context + AppendDuration func(key string, value time.Duration) Context + AppendFloat32 func(key string, value float32) Context + AppendFloat64 func(key string, value float64) Context + AppendInt func(key string, value int) Context + AppendInt32 func(key string, value int32) Context + AppendInt64 func(key string, value int64) Context + AppendRune func(key string, value rune) Context + AppendString func(key string, value string) Context + AppendTime func(key string, value time.Time) Context + AppendUint func(key string, value uint) Context + AppendUint32 func(key string, value uint32) Context + AppendUint64 func(key string, value uint64) Context + SetCaller func(file string, line int) Context + SetError func(value error) Context + WriteOut func(level Level, message string) + type DoneFunc func(message string) + type Event interface + Message func(message string) + Messagef func(format string, args ...any) + WithBool func(key string, value bool) Event + WithCaller func(file string, line int) Event + WithDuration func(key string, value time.Duration) Event + WithError func(value error) Event + WithFloat32 func(key string, value float32) Event + WithFloat64 func(key string, value float64) Event + WithFunc func(f func(Event) Event) Event + WithInt func(key string, value int) Event + WithInt32 func(key string, value int32) Event + WithInt64 func(key string, value int64) Event + WithRune func(key string, value rune) Event + WithString func(key string, value string) Event + WithStringer func(key string, value fmt.Stringer) Event + WithStringf func(key string, format string, args ...any) Event + WithTime func(key string, value time.Time) Event + WithUint func(key string, value uint) Event + WithUint32 func(key string, value uint32) Event + WithUint64 func(key string, value uint64) Event + func NewEvent(level Level, scope string, done DoneFunc) Event + func NewEventFromLogger(log Logger, level Level) Event + type Level byte + const LevelDebug + const LevelError + const LevelInfo + const LevelPanic + const LevelSilence + const LevelWarn + func ParseLevel(lvl string) (Level, error) + func (lvl Level) String() string + type Logger interface + Debug func() Event + Error func() Event + Info func() Event + Panic func() Event + Warn func() Event + func New() Logger + func NewScoped(scope string) Logger + type Mock struct + LogMessages []string + Logs []MockLog + func NewMock() *Mock + func (log *Mock) Debug() Event + func (log *Mock) Error() Event + func (log *Mock) Info() Event + func (log *Mock) NewContext(scope string) Context + func (log *Mock) Panic() Event + func (log *Mock) Warn() Event + type MockLog struct + Fields map[string]any + FieldsAdded []string + Level Level + Message string + type Sink interface + NewContext func(scope string) Context Other modules containing this package github.com/iver-wharf/wharf-core