Documentation
¶
Overview ¶
Package logger configures structured logging and carries loggers through contexts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the attached logger, or a logger that discards output if none is attached.
Types ¶
type Config ¶
type Config struct {
// Level is the minimum severity written to the log.
Level slog.Level `name:"log-level" default:"info" help:"Minimum log level (debug, info, warn, error)."`
// JSON enables JSON output instead of text output.
JSON bool `name:"log-json" help:"Write logs as JSON."`
}
Config contains logging flags that can be embedded in a Kong CLI.
Click to show internal directories.
Click to hide internal directories.