Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Info(msg string, args ...any)
- func RestoreAfterTUI(prev *slog.Logger)
- func SetDebug()
- func SetDebugFile(path string)
- func SetLogFile(path string)
- func SetPlugin(name string)
- func SilenceForTUI() *slog.Logger
- func Warn(msg string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestoreAfterTUI ¶
RestoreAfterTUI restores the logger saved by SilenceForTUI.
func SetDebug ¶
func SetDebug()
SetDebug switches the logger to DEBUG level. If no log file is configured, output goes to stderr.
func SetDebugFile ¶
func SetDebugFile(path string)
SetDebugFile opens path for append and switches the logger to DEBUG level writing to that file. If the file cannot be opened, the logger is left as-is.
func SetLogFile ¶
func SetLogFile(path string)
SetLogFile redirects log output (at INFO level) to path. Used when HARNESS_CLI_LOGFILE is set. If the file cannot be opened, the logger is left as-is.
func SetPlugin ¶
func SetPlugin(name string)
SetPlugin records the plugin name so it appears on every subsequent log line.
func SilenceForTUI ¶
SilenceForTUI suppresses log output while a Bubble Tea program owns the terminal. Returns the previous logger so RestoreAfterTUI can swap it back. When logging to a file there is no stderr conflict, so this is a no-op.
Types ¶
This section is empty.