Documentation
¶
Overview ¶
Package logging provides a custom slog handler with colored, human-readable output.
Index ¶
Constants ¶
View Source
const LevelVerbose = slog.Level(-2)
LevelVerbose sits between INFO and DEBUG for detailed progress messages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements slog.Handler with the format:
LEVEL TIMESTAMP [target] message key=value ...
func NewHandler ¶
NewHandler creates a Handler that writes to w. Color is auto-detected when w is os.Stderr (or any *os.File with a terminal fd).
type MultiHandler ¶
type MultiHandler struct {
// contains filtered or unexported fields
}
MultiHandler fans out log records to multiple slog.Handler implementations. Each child handler maintains its own writer, mutex, and settings.
func NewMultiHandler ¶
func NewMultiHandler(handlers ...slog.Handler) *MultiHandler
NewMultiHandler creates a handler that writes to all provided handlers.
func (*MultiHandler) Enabled ¶
Enabled returns true if any child handler is enabled at the given level.
Click to show internal directories.
Click to hide internal directories.