Documentation
¶
Overview ¶
Package logx configures the process-wide structured logger (slog) for gofer. A single text handler on stderr is installed as the slog default so any package can log key lifecycle events via slog.Info/Warn/Error without threading a logger through every struct. stderr (not stdout) keeps logs out of the CLI's data output (job JSON, completion scripts, etc.).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureFile ¶
func ConfigureFile(o FileOptions) error
ConfigureFile adds a rotating JSONL sink while retaining the text stderr sink. Explicit paths fail startup when they cannot be opened; implicit defaults warn and continue with stderr only.
func Setup ¶
func Setup()
Setup installs the default slog logger. The level comes from GOFER_LOG_LEVEL (debug | info | warn | error; default info); an unrecognised value falls back to info. Called once at process start (cmd/gofer/main).
func SilenceStderr ¶
func SilenceStderr()
SilenceStderr drops the stderr text sink for the rest of the process: a later ConfigureFile keeps only its file sink, and until then the default logger discards everything. It is what `gofer tunnel forward --quiet` means: nothing on the terminal, the file log untouched.