slogx

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDir

func EnsureDir(dir string) error

EnsureDir creates dir if it does not exist.

func Init

func Init()

Init initialises the global slog logger. Level is read from $CONVERTR_LOG (debug|info|warn|error). When unset, logging is silenced.

func LevelFromVerbosity

func LevelFromVerbosity(v int) slog.Level

LevelFromVerbosity maps -v count to a slog.Level.

func SetJSON

func SetJSON(level slog.Level)

SetJSON switches to JSON output (for --json / CI=1).

func SetLevel

func SetLevel(level slog.Level)

SetLevel overrides the log level at runtime (e.g. from --verbose flag).

Types

This section is empty.

Jump to

Keyboard shortcuts

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