log

package
v1.4.542 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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