Versions in this module Expand all Collapse all v1 v1.1.7 Apr 1, 2021 Changes in this version + const MissingKey + const TimeFormat + var DefaultLevel = Info + var DefaultOptions = &LoggerOptions + var DefaultOutput io.Writer = os.Stderr + func WithContext(ctx context.Context, logger Logger, args ...interface{}) context.Context + type Binary int + type CapturedStacktrace string + func Stacktrace() CapturedStacktrace + type ColorOption uint8 + const AutoColor + const ColorOff + const ForceColor + type ExcludeByMessage struct + func (f *ExcludeByMessage) Add(msg string) + func (f *ExcludeByMessage) Exclude(level Level, msg string, args ...interface{}) bool + type ExcludeByPrefix string + func (p ExcludeByPrefix) Exclude(level Level, msg string, args ...interface{}) bool + type ExcludeByRegexp struct + Regexp *regexp.Regexp + func (e ExcludeByRegexp) Exclude(level Level, msg string, args ...interface{}) bool + type ExcludeFuncs []func(level Level, msg string, args ...interface{}) bool + func (ff ExcludeFuncs) Exclude(level Level, msg string, args ...interface{}) bool + type Flushable interface + Flush func() error + type Format []interface + func Fmt(str string, args ...interface{}) Format + type Hex int + type InterceptLogger interface + DeregisterSink func(sink SinkAdapter) + NamedIntercept func(name string) InterceptLogger + RegisterSink func(sink SinkAdapter) + ResetNamedIntercept func(name string) InterceptLogger + StandardLoggerIntercept func(opts *StandardLoggerOptions) *log.Logger + StandardWriterIntercept func(opts *StandardLoggerOptions) io.Writer + func NewInterceptLogger(opts *LoggerOptions) InterceptLogger + type Level int32 + const Debug + const Error + const Info + const NoLevel + const Off + const Trace + const Warn + func LevelFromString(levelStr string) Level + func (l Level) String() string + type LevelWriter interface + LevelWrite func(level Level, p []byte) (n int, err error) + type LeveledWriter struct + func NewLeveledWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter + func (lw *LeveledWriter) LevelWrite(level Level, p []byte) (int, error) + func (lw *LeveledWriter) Write(p []byte) (int, error) + type Locker interface + Lock func() + Unlock func() + type Logger interface + Debug func(msg string, args ...interface{}) + Error func(msg string, args ...interface{}) + ImpliedArgs func() []interface{} + Info func(msg string, args ...interface{}) + IsDebug func() bool + IsError func() bool + IsInfo func() bool + IsTrace func() bool + IsWarn func() bool + Log func(level Level, msg string, args ...interface{}) + Name func() string + Named func(name string) Logger + ResetNamed func(name string) Logger + SetLevel func(level Level) + StandardLogger func(opts *StandardLoggerOptions) *log.Logger + StandardWriter func(opts *StandardLoggerOptions) io.Writer + Trace func(msg string, args ...interface{}) + Warn func(msg string, args ...interface{}) + With func(args ...interface{}) Logger + func Default() Logger + func FromContext(ctx context.Context) Logger + func FromStandardLogger(l *log.Logger, opts *LoggerOptions) Logger + func L() Logger + func New(opts *LoggerOptions) Logger + func NewNullLogger() Logger + func SetDefault(log Logger) Logger + type LoggerOptions struct + Color ColorOption + DisableTime bool + Exclude func(level Level, msg string, args ...interface{}) bool + IncludeLocation bool + IndependentLevels bool + JSONFormat bool + Level Level + Mutex Locker + Name string + Output io.Writer + TimeFormat string + type NoopLocker struct + func (n NoopLocker) Lock() + func (n NoopLocker) Unlock() + type Octal int + type OutputResettable interface + ResetOutput func(opts *LoggerOptions) error + ResetOutputWithFlush func(opts *LoggerOptions, flushable Flushable) error + type SinkAdapter interface + Accept func(name string, level Level, msg string, args ...interface{}) + func NewSinkAdapter(opts *LoggerOptions) SinkAdapter + type StandardLoggerOptions struct + ForceLevel Level + InferLevels bool