debug

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Package debug supplies the “--debug” and “--tinted” CLI flags for configuring the default structured logger.

  • “--debug” enables structured logging to stderr from debug level on and upwards (so no tracing).
  • “--tinted” enables tinted logs using the lmittmann/tint module.

Index

Constants

View Source
const (
	DebugFlagName  = "debug"
	TintedFlagName = "tinted"
)

Names of the CLI flags defined and used in this package.

Variables

This section is empty.

Functions

func SetDefaultLevel added in v0.2.0

func SetDefaultLevel(cmd *cobra.Command, level slog.Level)

SetDefaultLevel allows API users to override the default log level (info) with their own default level.

func SetLevel added in v0.2.0

func SetLevel(cmd *cobra.Command, level slog.Level)

SetLevel allows API users to force a specific log level; the "--debug" flag will then be ignored.

func SetWriter added in v0.2.0

func SetWriter(cmd *cobra.Command, w io.Writer)

Types

This section is empty.

Jump to

Keyboard shortcuts

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