Documentation
¶
Overview ¶
Package logger provides the shared, level-gated diagnostic logger for cloudtab. It is a thin wrapper over log/slog writing to stderr so debug output never mixes with report output on stdout.
Default level is WARN: normal runs stay quiet except for genuine warnings (e.g. a disabled price cache). Passing --debug on the CLI switches the level to DEBUG, surfacing cache hits, retries, and per-call backend latency — enough to answer "why is this run slow / why was this SKU re-fetched" without attaching a debugger.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Info ¶ added in v0.3.16
Info logs at INFO level. INFO sits above the default WARN gate, so a plain Info call is normally suppressed; the end-of-run summary uses Summary (below) which writes to stderr unconditionally, independent of the level gate.
func SetDebug ¶
func SetDebug(on bool)
SetDebug enables (or disables) debug-level logging on the shared logger.
func Summary ¶ added in v0.3.16
func Summary(line string)
Summary writes a single, already-formatted human-readable line to stderr, bypassing the slog level gate and its key=value formatting. It is used for the end-of-run summary so the line is legible and always shown, while report output on stdout stays untouched.
Types ¶
This section is empty.