Documentation
¶
Overview ¶
wrappers for slog methods see: https://pkg.go.dev/log/slog#example-package-Wrapping
Index ¶
- func Audit(ctx context.Context, msg string, args ...any)
- func Debug(ctx context.Context, msg string, args ...any)
- func Error(ctx context.Context, msg string, args ...any)
- func FileDriver(logPath string, o ...*Options) (logger *slog.Logger, closer func(), err error)
- func Info(ctx context.Context, msg string, args ...any)
- func Stderr(o ...*Options) *slog.Logger
- func Stdout(o ...*Options) *slog.Logger
- func Trace(ctx context.Context, msg string, args ...any)
- func Warn(ctx context.Context, msg string, args ...any)
- type Level
- type Logger
- type Options
- func (o *Options) Audit(ctx context.Context, msg string, args ...any)
- func (o *Options) Debug(ctx context.Context, msg string, args ...any)
- func (o *Options) Enabled(ctx context.Context, level slog.Level) bool
- func (o *Options) Error(ctx context.Context, msg string, args ...any)
- func (o *Options) Handle(ctx context.Context, record slog.Record) error
- func (o *Options) Info(ctx context.Context, msg string, args ...any)
- func (o *Options) Trace(ctx context.Context, msg string, args ...any)
- func (o *Options) Warn(ctx context.Context, msg string, args ...any)
- func (o *Options) WithAttrs(attrs []slog.Attr) slog.Handler
- func (o *Options) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileDriver ¶
Types ¶
type Logger ¶
type Logger interface {
Error(ctx context.Context, msg string, args ...any)
Warn(ctx context.Context, msg string, args ...any)
Audit(ctx context.Context, msg string, args ...any)
Info(ctx context.Context, msg string, args ...any)
Debug(ctx context.Context, msg string, args ...any)
Trace(ctx context.Context, msg string, args ...any)
}
Click to show internal directories.
Click to hide internal directories.