log

package
v1.4.452 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 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 ...any)

Debug writes a debug message if the global level permits.

func Log added in v1.4.296

func Log(format string, a ...any)

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
	// Wire logs full request/response exchanges with model backends.
	Wire
)

func GetLevel added in v1.4.419

func GetLevel() Level

GetLevel returns the current global debug level.

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