Versions in this module Expand all Collapse all v2 v2.7.1 Nov 12, 2023 Changes in this version + var DefaultFormat = TextFormat + var DefaultLevel = InfoLevel + var DefaultOutput = &peekLogWriter + func Debug(message string, v ...any) + func DisableDates() + func Error(message string, v ...any) + func Fatal(message string, v ...any) + func File() string + func Info(message string, v ...any) + func IsDebug() bool + func IsFile() bool + func IsTrace() bool + func Loggable(l Level) bool + func ResetLevelOverrides() + func SetFormat(newFormat Format) + func SetLevel(newLevel Level) + func SetLevelOverride(field string, value string, level Level) + func SetOutput(w io.Writer) + func Trace(message string, v ...any) + func Warn(message string, v ...any) + type Context map[string]any + func (c Context) Merge(other Context) + type Contexter interface + Context func() Context + type Event struct + Level Level + Message string + Timestamp string + func Field(key string, value any) *Event + func Fields(fields Context) *Event + func Tag(tag string) *Event + func Time(time time.Time) *Event + func Timing(f func()) *Event + func With(contexts ...Contexter) *Event + func (e *Event) Debug(message string, v ...any) *Event + func (e *Event) Err(err error) *Event + func (e *Event) Error(message string, v ...any) *Event + func (e *Event) Fatal(message string, v ...any) + func (e *Event) Field(key string, value any) *Event + func (e *Event) FieldIf(key string, value any, level Level) *Event + func (e *Event) Fields(fields Context) *Event + func (e *Event) Info(message string, v ...any) *Event + func (e *Event) IsDebug() bool + func (e *Event) IsTrace() bool + func (e *Event) JSON() string + func (e *Event) Log(l Level, message string, v ...any) *Event + func (e *Event) Loggable(l Level) bool + func (e *Event) Render(l Level, message string, v ...any) string + func (e *Event) String() string + func (e *Event) Tag(tag string) *Event + func (e *Event) Time(t time.Time) *Event + func (e *Event) Timing(f func()) *Event + func (e *Event) Trace(message string, v ...any) *Event + func (e *Event) Warn(message string, v ...any) *Event + func (e *Event) With(contexters ...Contexter) *Event + type Format int + const JSONFormat + const TextFormat + func CurrentFormat() Format + func ToFormat(s string) Format + func (f Format) String() string + type Level int + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const TraceLevel + const WarnLevel + func CurrentLevel() Level + func ToLevel(s string) Level + func (l Level) MarshalJSON() ([]byte, error) + func (l Level) String() string