Function record_event
pub fn record_event(event: LogEvent)Expand description
Emit one event. Always fans out to the broadcast hook + tracing event.
If persistence is enabled, hands the serialized value to the disk
worker via a bounded try_send. The hot path performs no file I/O.
The broadcast copy carries ephemeral_attributes deep-merged into
attributes (live SSE consumers may render short-lived pairing
credentials); the persisted copy never does — LogEvent marks the
field serde(skip), so the serialized value below is credential-free
by construction.
This is the function the record! macro expands into. Direct callers
(the schema migration tool, tests) can invoke it too, but production
code should go through the macro so the tracing::event! carries the
correct file:line source info.