log

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log provides the family's logging foundation: a log/slog logger rendered through charm.land/log/v2, the same interface/implementation split as cli.Run/fang. See forge ADR-0011.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LevelFor added in v0.11.0

func LevelFor(verbose bool) slog.Level

LevelFor maps the family --verbose flag to a log level: slog.LevelWarn when off (only problems surface; the ui layer owns the happy-path narrative), slog.LevelDebug when on (full diagnostic trace). See forge ADR-0011.

func New

func New(w io.Writer, level slog.Level) *slog.Logger

New returns a *slog.Logger that renders leveled, colored, TTY-aware output through charm.land/log/v2 (which detects w's color profile itself). level sets the minimum level reported; w is typically os.Stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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