Documentation
¶
Overview ¶
Package logger configures AGH structured logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MirrorToStderrEnabled ¶
MirrorToStderrEnabled reports whether process-local logging should still be mirrored to stderr.
func New ¶
New constructs a structured logger and returns a close function for any opened file handle.
func ParseLevel ¶
ParseLevel converts the configured string level into slog's level type.
func WithMirrorToStderrEnv ¶
WithMirrorToStderrEnv sets the detached-process env override controlling stderr mirroring.
Types ¶
type FileRotationConfig ¶
FileRotationConfig configures the daemon log sink's file rotation policy.
type Option ¶
type Option func(*options)
Option customizes logger construction.
func WithFileRotation ¶
func WithFileRotation(rotation FileRotationConfig) Option
WithFileRotation enables lumberjack-backed rotation for the structured file sink.
func WithMirrorToStderr ¶
WithMirrorToStderr mirrors logs to stderr in addition to any file target.