logger

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func GetLogger() *zerolog.Logger

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL