Versions in this module Expand all Collapse all v0 v0.1.5 Oct 15, 2026 Changes in this version + func CtxDebug(ctx context.Context, msg string, keysAndValues ...any) + func CtxDebugf(ctx context.Context, format string, args ...any) + func CtxError(ctx context.Context, msg string, keysAndValues ...any) + func CtxErrorf(ctx context.Context, format string, args ...any) + func CtxInfo(ctx context.Context, msg string, keysAndValues ...any) + func CtxInfof(ctx context.Context, format string, args ...any) + func CtxWarn(ctx context.Context, msg string, keysAndValues ...any) + func CtxWarnf(ctx context.Context, format string, args ...any) + func Debug(msg string, keysAndValues ...any) + func Debugf(format string, args ...any) + func Error(msg string, keysAndValues ...any) + func Errorf(format string, args ...any) + func ExtractTrace(ctx context.Context) string + func FormatAttrs(attrs ...Attr) string + func FormatKeysAndValues(keysAndValues ...any) string + func FormatWithTraceID(traceID, format string, args ...any) string + func Info(msg string, keysAndValues ...any) + func Infof(format string, args ...any) + func IsHlogBacked(l Logger) bool + func LevelString(level Level) string + func SetDefault(l Logger) + func SetTraceExtractor(fn func(context.Context) string) + func SkipCallerFiles(files ...string) + func UseSlog(service string) + func Warn(msg string, keysAndValues ...any) + func Warnf(format string, args ...any) + type Attr struct + Key string + Value any + type BaseLogger struct + Attrs []Attr + Ctx context.Context + Level Level + Mu sync.Mutex + Service string + func NewBaseLogger(service string, level Level) BaseLogger + func (b *BaseLogger) EffectiveCtx() context.Context + func (b *BaseLogger) MergeAttrs(attrs ...Attr) []Attr + func (b *BaseLogger) Prefix() string + func (b *BaseLogger) SetLevel(level Level) + func (b *BaseLogger) ShouldLog(level Level) bool + func (b *BaseLogger) Snapshot() BaseLogger + type ContextLogger interface + CtxDebug func(ctx context.Context, msg string, keysAndValues ...any) + CtxDebugf func(ctx context.Context, format string, args ...any) + CtxError func(ctx context.Context, msg string, keysAndValues ...any) + CtxErrorf func(ctx context.Context, format string, args ...any) + CtxInfo func(ctx context.Context, msg string, keysAndValues ...any) + CtxInfof func(ctx context.Context, format string, args ...any) + CtxWarn func(ctx context.Context, msg string, keysAndValues ...any) + CtxWarnf func(ctx context.Context, format string, args ...any) + type CoreLogger interface + Debug func(msg string, keysAndValues ...any) + Error func(msg string, keysAndValues ...any) + Info func(msg string, keysAndValues ...any) + Warn func(msg string, keysAndValues ...any) + type FileSink struct + func NewFileSink(path string) (*FileSink, error) + func (s *FileSink) Close() error + func (s *FileSink) Sync() error + func (s *FileSink) Write(p []byte) (int, error) + type FormattedLogger interface + Debugf func(format string, args ...any) + Errorf func(format string, args ...any) + Infof func(format string, args ...any) + Warnf func(format string, args ...any) + type HlogBacked interface + IsHlogLogger func() + type Level int + const LevelDebug + const LevelError + const LevelInfo + const LevelWarn + func ParseLogLevel(s string) *Level + type Logger interface + func Default() Logger + func Delegating(component ...string) Logger + func NewSlogLogger(service string) Logger + func NewStdLogger(service string, level ...Level) Logger + func WithCtx(ctx context.Context) Logger + func WithService(name string) Logger + type LoggerBuilder interface + SetLevel func(level Level) + WithAttrs func(attrs ...Attr) Logger + WithCtx func(ctx context.Context) Logger + WithGroup func(name string) Logger + WithService func(name string) Logger + type MultiSink struct + func NewMultiSink(sinks ...Sink) *MultiSink + func (m *MultiSink) Add(s Sink) bool + func (m *MultiSink) Close() error + func (m *MultiSink) Sync() error + func (m *MultiSink) Write(p []byte) (int, error) + type RotatingOption func(*lumberjack.Logger) + func WithCompress(b bool) RotatingOption + func WithLocalTime(b bool) RotatingOption + func WithMaxAge(days int) RotatingOption + func WithMaxBackups(n int) RotatingOption + type RotatingSink struct + func NewRotatingSink(basePath string, maxSizeMB int, opts ...RotatingOption) (*RotatingSink, error) + func (s *RotatingSink) Close() error + func (s *RotatingSink) Sync() error + func (s *RotatingSink) Write(p []byte) (int, error) + type Sink interface + Close func() error + Sync func() error + Write func(p []byte) (n int, err error)