Documentation
¶
Overview ¶
Package logging contains helpers for logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrAttr ¶
ErrAttr provides a slog.Attr to reduce a bit of boilerplate when logging errors. Credits go to https://github.com/golang/go/issues/59364#issuecomment-1493237877.
func NewBufLogHandler ¶ added in v0.1.9
func NewBufLogHandler(buf *bytes.Buffer, opts *slog.HandlerOptions) *slog.TextHandler
NewBufLogHandler provides a slog.TextHandler which logs to the provided bytes.Buffer.
func NewNopLogger ¶
NewNopLogger provides a NopLogger which uses io.Discard to write logs to.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.