log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package log configures and exposes the application-wide structured logger.

The logger is backed by log/slog. Call Init once at startup (wired into the root cobra PersistentPreRunE) before any command handler runs.

Convention:

  • slog.Debug – internal operation traces; only emitted with --verbose.
  • slog.Info – significant lifecycle events always written to stderr.
  • fmt.Print* – user-facing command output written to stdout; never replaced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(verbose bool)

Init configures the global slog logger.

  • verbose=false → Info level, compact format (no timestamps), stderr.
  • verbose=true → Debug level, full text format with timestamps, stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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