Documentation
¶
Overview ¶
Package slog writes TTYPE Desk diagnostics to a rotating log file. Use this for troubleshooting crashes and UI issues without spoiling the TUI.
Index ¶
- func Close()
- func Debug(format string, args ...any)
- func Error(format string, args ...any)
- func Guard(where string, fn func()) (ok bool)
- func Info(format string, args ...any)
- func Init() error
- func Panic(recovered any)
- func Path() string
- func RecoverAndLog(where string) (panicked any)
- func Warn(format string, args ...any)
- func Writer() io.Writer
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Guard ¶
Guard runs fn and recovers panics, logging them. Returns true if fn completed without panic.
func RecoverAndLog ¶
RecoverAndLog recovers from panic in a defer, logs it, and returns the panic value (nil if none).
Types ¶
Click to show internal directories.
Click to hide internal directories.