Documentation
¶
Overview ¶
Package logging is amux's file-based logger. Internal packages route diagnostics through it (Debug/Info/Warn/Error) instead of writing to stdout/stderr, which is reserved for the CLI entrypoints.
The minimum level defaults to INFO; set AMUX_LOG_LEVEL=debug (or info/warn/ error) to change it, which is required to surface the Debug call sites. AMUX_LOG_RETENTION_DAYS controls how many days of log files are retained.
Index ¶
- func Close() error
- func Debug(format string, args ...any)
- func Error(format string, args ...any)
- func GetLogPath() string
- func Info(format string, args ...any)
- func Initialize(logDir string, level Level) error
- func SetEnabled(enabled bool)
- func Warn(format string, args ...any)
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize sets up the default logger
Types ¶
type Level ¶
type Level int
Level represents log severity
func ParseLevel ¶ added in v0.0.20
ParseLevel maps a level name (debug/info/warn/error, case-insensitive and trimmed) to a Level. The bool is false for unrecognized input so callers can fall back to a default.