Documentation ¶
Index ¶
- type SlogMessageOnlyHandler
- func (h *SlogMessageOnlyHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *SlogMessageOnlyHandler) Handle(ctx context.Context, record slog.Record) error
- func (h *SlogMessageOnlyHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *SlogMessageOnlyHandler) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlogMessageOnlyHandler ¶
SlogMessageOnlyHandler is a trivial slog handler that prints only messages. All attributes and groups are ignored. It's useful in example tests where it produces output that's normalized so we match against it (normally, all log lines include timestamps so it's not possible to have reproducible output).
Click to show internal directories.
Click to hide internal directories.