Versions in this module Expand all Collapse all v0 v0.1.1 Oct 2, 2026 v0.1.0 Sep 22, 2026 Changes in this version + var LogLevel = legacyLevel() + func Error(err error) slog.Attr + func SetDefault(log *Log) + func WithValue(ctx context.Context, attr slog.Attr) context.Context + type Config struct + AddSource bool + AddVerbose bool + Env string + JSON bool + Level string + Output string + Rate float64 + func (c Config) IsDev() bool + func (c Config) IsLocal() bool + func (c Config) IsProduction() bool + func (c Config) IsStaging() bool + type Log struct + func Default() *Log + func Discard(handlers ...OptionHandler) *Log + func DiscardJSONWithWriter(writer io.Writer) *Log + func DiscardTextWithWriter(writer io.Writer) *Log + func New(cfg Config, opts ...Option) (*Log, error) + func NewLogger(cfg Config, handlers ...OptionHandler) (*Log, error) + func (l *Log) Close() error + func (l *Log) Flush() error + func (l *Log) WithAttrs(attrs ...slog.Attr) Logger + func (l *Log) WithNamed(name string) Logger + type Logger interface + DebugContext func(ctx context.Context, msg string, args ...any) + ErrorContext func(ctx context.Context, msg string, args ...any) + Handler func() slog.Handler + InfoContext func(ctx context.Context, msg string, args ...any) + LogAttrs func(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr) + WarnContext func(ctx context.Context, msg string, args ...any) + WithAttrs func(attrs ...slog.Attr) Logger + WithNamed func(name string) Logger + type Middleware func(slog.Handler) slog.Handler + type Option func(*options) + func WithAdditionalHandlers(handlers ...OptionHandler) Option + func WithClosers(closers ...io.Closer) Option + func WithHandler(handler slog.Handler) Option + func WithLevel(level slog.Leveler) Option + func WithMiddleware(middleware ...Middleware) Option + func WithReplaceAttr(replace func([]string, slog.Attr) slog.Attr) Option + func WithWriter(writer io.Writer) Option + type OptionHandler func(*slog.HandlerOptions) slog.Handler