Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReplaceAttrFn = func(groups []string, a slog.Attr) slog.Attr { if a.Key == slog.LevelKey { level := log.Level(a.Value.Any().(slog.Level)) a.Value = slog.StringValue(level.String()) } return a }
ReplaceAttrFn can be used with slog.HandlerOptions to replace attributes. This function replaces the "level" attribute to get the custom log levels of this package.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implementation.
Click to show internal directories.
Click to hide internal directories.