logging

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultStdoutContext = ForceStdoutContext(context.Background())
)

Functions

func ConfigureLogging

func ConfigureLogging(mode string, isDebug bool) *slog.Logger

func ForceStdoutContext added in v1.5.0

func ForceStdoutContext(parent context.Context) context.Context

func LogValidationErrors added in v1.9.0

func LogValidationErrors(filename string, validationErrors []validator.ValidationError, err error, outputJSON bool)

func Logger

func Logger() *slog.Logger

func NewRawLoggerTo added in v1.4.0

func NewRawLoggerTo(w io.Writer) *slog.Logger

func RawLogger added in v1.3.0

func RawLogger() *slog.Logger

RawLogger returns a logger that just prints the message field as-is, without any extra formatting. This is useful for programs that need to output raw data.

Types

type OutputMode

type OutputMode string

OutputMode is a custom type for specifying a small number of allowed parameters in Cobra (cli-library).

const (
	OutputModeText OutputMode = "text"
	OutputModeJSON OutputMode = "json"
)

Jump to

Keyboard shortcuts

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