log

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: GPL-3.0, LGPL-3.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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