log

package
v1.4.316 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(l Level, format string, a ...interface{})

Debug writes a debug message if the global level permits.

func Log added in v1.4.299

func Log(format string, a ...interface{})

Log writes a message unconditionally to stderr. This is for important messages that should always be shown regardless of debug level.

func SetLevel

func SetLevel(l Level)

SetLevel sets the global debug level.

func SetOutput

func SetOutput(w io.Writer)

SetOutput allows overriding the output destination for debug logs.

Types

type Level

type Level int

Level represents the debug verbosity.

const (
	// Off disables all debug output.
	Off Level = iota
	// Basic provides minimal debugging information.
	Basic
	// Detailed provides more verbose debugging.
	Detailed
	// Trace is the most verbose level.
	Trace
)

func LevelFromInt

func LevelFromInt(i int) Level

LevelFromInt converts an int to a Level.

Jump to

Keyboard shortcuts

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