logging

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(value time.Duration) string

FormatDuration returns a short human-readable duration string for logs.

func NewConsole

func NewConsole(stderr io.Writer, verbosity int, quiet bool) *zap.Logger

NewConsole returns a logger configured for human-readable terminal output. verbosity controls the log level: 0 = warn, 1 = info, 2+ = debug. When quiet is true the logger only emits errors.

Types

type CommandStderr

type CommandStderr struct {
	// contains filtered or unexported fields
}

CommandStderr captures subprocess stderr and only mirrors it when verbose mode is enabled.

func NewCommandStderr

func NewCommandStderr(visible io.Writer, verbose bool) *CommandStderr

NewCommandStderr creates a subprocess stderr writer for the selected verbosity.

func (*CommandStderr) String

func (w *CommandStderr) String() string

String returns the captured stderr contents with surrounding whitespace trimmed.

func (*CommandStderr) Write

func (w *CommandStderr) Write(p []byte) (int, error)

Write records stderr output and mirrors it when verbose mode is enabled.

Jump to

Keyboard shortcuts

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