Documentation
¶
Overview ¶
Package logging configures the process-wide slog logger: structured text with source file:line on every record, mirrored to stderr and a persistent file under the lich config dir. The file is the audit trail — it is what remains on Windows once the GUI-subsystem build drops the console, and what a bug report quotes. The session token is never logged: the file outlives the session that would have made it useful.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init points slog's default logger at stderr plus <dir>/lich.log (lich-dev.log under LICH_DEV, mirroring the store's database split), with the level taken from LICH_LOG_LEVEL (debug|warn|error; default info), and routes the runtime's crash output to the same file. The returned closer owns the file. When the file cannot be opened, logging still works on stderr alone: the closer is nil and the error says why the persistent half is missing — the caller reports it and carries on.
func NativePath ¶
NativePath is the file OpenNative writes to under dir, for a bug report to attach beside Path's.
func OpenNative ¶
OpenNative opens the native window's log under dir, lich-native.log (lich-native-dev.log under LICH_DEV), rotated as lich.log is. A native window started detached has no terminal: its stdout and stderr go here, and so does a crash or a stalled event loop it reports.
Types ¶
This section is empty.