Skip to main content

Module audit

Module audit 

Source
Expand description

Host-log sink bridge — the sanctioned public path for installing a leveled log sink into the kernel (set_log_fn) and for emitting through it (warn / info / …). The activity runner installs its observer::log here so polydat’s cycle-time data-source audit lines land in session.log. A host with no log logger of its own can install audit::LogBridge to route vectordata’s log records into the same channel. This is the one public entry point for the audit channel; the implementation lives under library::support, which is library-internal and must not be reached directly. 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).

Structs§

LogBridge
A log logger that forwards vectordata’s records into the audit channel, so its warnings reach the host’s sink beside polydat’s own lines. The records forwarded are those at Info and above from the vectordata crate and its veks_* crates, each as <target>: <message> at the matching LogLevel.

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 over profile of the dataset named dataset. 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 facet of profile of the dataset named dataset. Emitted from every vectors::* reader-open path before the actual view.<facet>_as() / view.facet_as() 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 facet of profile of the dataset named dataset. Emitted once per facet in the report of the prebuffer’s view.fetch.
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.