Documentation
¶
Overview ¶
Package logging builds slog loggers and carries one on a context, so app and library code log through a per-invocation logger instead of the process-global slog default. The CLI configures one logger per command Execute (respecting --verbose/--quiet and the command's stderr) and threads it through the context the app and pkg layers already receive; no code mutates slog's default.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerFromContext ¶
LoggerFromContext returns the logger carried by ctx, or slog.Default() when none is present (library callers that never set one, tests, the operator). It never returns nil. slog.Default() is only ever read here, never replaced, so concurrent callers do not race on a process global.
Types ¶
This section is empty.