log

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: GPL-3.0, LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package log provides context-based structured logging.

The logger is injected into context at the CLI layer and extracted in pkg/ code via From. When no logger is present in the context, a no-op logger is returned. This design keeps logging local and injectable, allowing the slog backend to be replaced with a richer progress UI in the future without changing call sites.

Index

Constants

View Source
const LevelTrace = slog.Level(-8)

LevelTrace is a custom level below Debug for low-level diagnostics such as docker commands and probe retry attempts.

Variables

This section is empty.

Functions

func From

func From(ctx context.Context) *slog.Logger

From extracts the logger from the context. Returns a no-op logger if none is set.

func Nop

func Nop() *slog.Logger

Nop returns a no-op logger that discards all output.

func With

func With(ctx context.Context, l *slog.Logger) context.Context

With stores a logger in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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