Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = slog.Default
	Debug   = slog.Debug
	Info    = slog.Info
	Warn    = slog.Warn
	Error   = slog.Error
	With    = slog.With
)
View Source
var Flags = []cli.Flag{
	&cli.BoolFlag{
		Name:        "verbose",
		Aliases:     []string{"v"},
		Usage:       "Set logging level more verbose to include info level logs",
		Value:       false,
		Destination: &Opts.Verbose,
	},

	&cli.BoolFlag{
		Name:        "veryverbose",
		Aliases:     []string{"vv"},
		Usage:       "Set logging level more verbose to include debug level logs",
		Destination: &Opts.VeryVerbose,
	},

	&cli.BoolFlag{
		Name:        "quiet",
		Aliases:     []string{"q"},
		Usage:       "Set logging level to show only errors, suppressing warnings",
		Destination: &Opts.Quiet,
	},

	&cli.StringSliceFlag{
		Name:        "log-ids",
		Usage:       "Always emit logging for these ids, comma separated",
		Destination: &Opts.LogIDs,
	},
}
View Source
var Opts struct {
	Verbose     bool
	VeryVerbose bool
	Quiet       bool
	LogIDs      []string
}

Functions

func Dump

func Dump(v any)

func Setup

func Setup()

Types

type Logger

type Logger = slog.Logger

Jump to

Keyboard shortcuts

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