log

package
v0.0.0-...-21f28d8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

func Error

func Error(msg string, args ...any)

func Info

func Info(msg string, args ...any)

func Logger

func Logger() *slog.Logger

Logger returns the currently in-use instance of *slog.Logger This can be used in tests to get the default loggers to later restore on cleanup.

func SetFormat

func SetFormat(format string) error

func SetLogLevel

func SetLogLevel(level string) error

func SetLogger

func SetLogger(l *slog.Logger)

SetLogger allows consumers to supply their own slog.Logger. When provided, the internal logger will use it as-is (including its handler, writer, level). SetLogLevel will still update levelVar for the default logger, but will not override a custom logger's handler configuration.

func Warn

func Warn(msg string, args ...any)

Types

type LogLevel

type LogLevel int
const (
	DebugLevel LogLevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
)

Jump to

Keyboard shortcuts

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