hlog

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.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 RestoreAfterTUI

func RestoreAfterTUI(prev *slog.Logger)

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

func SilenceForTUI() *slog.Logger

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.

func Warn

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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