riglogger

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package riglogger bridges cargoship's context-scoped logger into rig v2's slog-based logging. rig v2 removed the v0.x global rig.SetLogger(l) setter -- logging is now configured per client via the rig.WithLogger client option. Since rig clients are constructed deep inside the phase pipeline (via ZarfHost.Connect, see src/api/zarf.dev/v1alpha1/cluster/host.go) rather than at a single call site with easy access to the request context, this package stores the most recently configured logger so that ZarfHost.Connect can pass it to rig.WithLogger without threading a logger argument through every phase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() *slog.Logger

Logger returns the currently configured rig logger. If RigLogger has not been called yet, it returns a logger that discards everything.

func RigLogger

func RigLogger(ctx context.Context) error

RigLogger overrides rig's logger with our custom logger, bound to ctx. The resulting logger is retrieved by ZarfHost.Connect (via Logger) and passed to rig.WithLogger when the underlying rig client is constructed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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