Skip to main content

Module audit

Module audit 

Source
Expand description

Cycle-time data-source audit log.

Emits one structured line per significant data-source event so the operator can spot mismatches between what crate::library::vectors::do_dataset_prebuffer covered and what cycle-time accessors opened. The typical failure mode this catches: prebuffer reports success but readers still hit HTTP per cycle, because the facets the workload reads aren’t in the active profile’s manifest.

Output is routed through set_log_fn when the caller (the activity runner, the test harness, …) installs a sink. With no sink installed, lines go to stderr — preserves visibility from contexts that don’t carry an observer::log plumbing path (unit tests, the dryrun= paths).

Enums§

LogLevel
Severity for audit-channel events. A conventional severity ladder so a host’s installed sink can map it 1:1 to its own logger levels without reformatting.

Functions§

debug
Convenience helpers for callsite ergonomics.
error
Log at Error.
info
Log at Info.
log
Emit a leveled message through the configured sink, falling back to stderr when no sink is installed (unit tests, dryrun paths, pre-init).
log_prebuffer_summary
One-line summary at the end of dataset_prebuffer. Pairs with the per-facet prebuffer: covered … lines above and the vectordata: opened … lines below to make the covered-vs-opened delta easy to read.
record_opened
Record that a reader was opened for a facet. Emitted from every vectors::* reader-open path before the actual view.<facet>() / open_facet_typed call so the line lands even if the open errors. kind distinguishes the open shape (uniform, ivvec32, generic-typed, …) for at-a-glance debugging.
record_prebuffer_entered
Record that dataset_prebuffer(...) was invoked. Emitted at the top of do_dataset_prebuffer unconditionally — fires even if the function bails on a resolve / profile-missing error, so the absence of this line in session.log is definitive evidence that init prebuffer = ... never evaluated. Pairs with record_prebuffered (per-facet) and log_prebuffer_summary (tail).
record_prebuffered
Record that the prebuffer pass covered a facet. Emitted from inside the view.prebuffer_all_with_progress callback, once per facet the manifest declared.
set_log_fn
Install the audit sink. A host installs this once so audit lines flow through its own logger alongside the rest of the run output. Subsequent calls are no-ops.
warn
Log at Warn.