debug

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package debug supplies the --log and --debug CLI flags.

  • --log enables logging to stderr from info level on and upwards.
  • --debug enables logging to stderr from debug level on and upwards, so no tracing.

Index

Constants

View Source
const (
	DebugFlagName = "debug"
	LogFlagName   = "log"
)

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

Variables

This section is empty.

Functions

func BeforeCommand

func BeforeCommand(cmd *cobra.Command) error

Ensure to enable debug logging before any command finally is executed.

func SetupCLI

func SetupCLI(cmd *cobra.Command)

SetupCLI adds the "--debug" and "--log" flags to the specified command that changes the logging level to debug or enable logging at the info level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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