Documentation
¶
Overview ¶
Package logging provides structured logging for AgentCTL using stdlib slog. Default level is Warn (silent in normal use). Enable debug with --debug flag or /debug command.
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Info(msg string, args ...any)
- func Init(w io.Writer, debug bool)
- func InitWithFile(debug bool) func()
- func IsDebug() bool
- func LogDir() string
- func SessionID() string
- func SetDebug(on bool)
- func Span(op string, args ...any) func()
- func Warn(msg string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitWithFile ¶ added in v0.0.34
func InitWithFile(debug bool) func()
InitWithFile sets up logging to both stderr and a log file. Returns a closer function. If file creation fails, logs to stderr only.
func SessionID ¶ added in v0.0.34
func SessionID() string
SessionID generates a short unique session identifier.
func SetDebug ¶
func SetDebug(on bool)
SetDebug toggles debug level at runtime (for /debug command).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.