Documentation
¶
Overview ¶
Package slogdiscard provides a no-op logger and handler for the Go 'slog' package. Useful for disabling log output in testing or production when logging is not desired.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct{}
Handler is a no-op implementation of slog.Handler.DiscardHandler
func NewHandler ¶
func NewHandler(_ io.Writer, _ *slog.HandlerOptions) *Handler
NewHandler returns a new instance of discard handler.
func (*Handler) Enabled ¶
Enabled reports whether a record at the given level should be logged. Always returns false, meaning no log records are ever enabled.
func (*Handler) Handle ¶
Handle receives a log record and does nothing with it. Always returns nil, indicating no error but no action taken.
Click to show internal directories.
Click to hide internal directories.