verbosity

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package verbosity resolves the log level the binaries are started with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromArgs

func FromArgs(args []string) int

FromArgs returns the verbosity requested through -v, ignoring every other flag. The arguments are parsed here because the logger is built before the flag sets that own them are.

func LogLevel

func LogLevel(verbosity int) slog.Level

LogLevel follows the logr mapping of V(0) onto info and V(4) onto debug.

func RegisterFlag

func RegisterFlag()

RegisterFlag declares -v unless one of the logging libraries already did.

Types

This section is empty.

Jump to

Keyboard shortcuts

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