Documentation ¶
Index ¶
- Constants
- func CreatedAt(value time.Time) slog.Attr
- func Err(value error) slog.Attr
- func ParseLevel(s string) (slog.Level, error)
- func RenameLevels(_ []string, attr slog.Attr) slog.Attr
- func UserId(value int) slog.Attr
- type Logger
- func (l *Logger) Alert(ctx context.Context, msg string, attrs ...slog.Attr)
- func (l *Logger) Enabled(ctx context.Context, level slog.Level) bool
- func (l *Logger) Handler() slog.Handler
- func (l *Logger) Info(ctx context.Context, msg string, attrs ...slog.Attr)
- func (l *Logger) Log(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)
- func (l *Logger) With(attrs ...slog.Attr) *Logger
- func (l *Logger) WithGroup(name string) *Logger
Constants ¶
View Source
const LevelAlert = slog.Level(12)
View Source
const LevelInfo = slog.Level(0)
View Source
const RequestId = "request_id"
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.