log

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 9 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 Diagnostic

func Diagnostic(event DiagnosticEvent)

func Error

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

func Info

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

func Init

func Init() (io.Closer, error)

func L

func L() *slog.Logger

func ProfileFallback

func ProfileFallback(scope, profile string)

func SetLogger

func SetLogger(l *slog.Logger) *slog.Logger

SetLogger swaps the package logger and returns the previous one, so callers (chiefly tests) can install a capturing handler and restore it afterwards.

func UseStderr

func UseStderr(w io.Writer)

UseStderr installs the non-file fallback used when Init cannot create or open the cache log. The caller remains responsible for printing the single initialization warning that explains why the fallback was selected.

func Warn

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

Types

type DiagnosticEvent

type DiagnosticEvent struct {
	Event    string
	Session  string
	ClientID string
	Protocol int
	Role     string
	Reason   string
	Provider string
	Profile  string
	Policy   string
	Fallback string
	TermHint string
}

Jump to

Keyboard shortcuts

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