Documentation
¶
Overview ¶
Package log writes the append-only audit trail, ported from util/log.audit. Each event is one JSON line: {ts, event, ...fields}. The log lives in the config home (not ~/.ssh), so it is outside the reconcile/render parity surface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Audit ¶
Audit appends one JSON line to auditLog (best-effort: I/O errors are swallowed). The parent dir is created 0700 and a freshly created log is 0600.
func SetSink ¶
SetSink registers fn to receive every event Audit records, once audit.log has been written (or failed to be), and returns the sink it replaced. nil removes it.
It exists so the history store can index the audit trail without this package importing it: util/log stays dependency-free, and the store registers itself from the command layer. The audit log is still written first and regardless, so a sink that fails loses nothing audit.log did not already have.