Documentation
¶
Overview ¶
Package logger provides a zerolog-based logger with verbosity levels.
Verbosity mapping:
- 0 (default): Error level
- -v (1): Warn level
- -vv (2): Info level
- -vvv (3): Debug level
- -vvvv (4+): Trace level
The logger outputs to stderr with colored console formatting and RFC3339 timestamps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disable ¶
func Disable()
Disable disables all logging output. This is useful for interactive modes (e.g., TUI) where log output would interfere with the display.
func GetLogger ¶
GetLogger returns a pointer to the shared logger instance. All callers receive the same logger, so level changes via SetLogLevel affect all users of this logger.
func SetLogLevel ¶
func SetLogLevel(verboseCount int)
SetLogLevel adjusts the shared logger's level based on verbosity count. This is typically called from CLI flag processing.
Mapping:
- 0: Error (default, quietest)
- 1: Warn
- 2: Info
- 3: Debug
- 4+: Trace (most verbose)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.