pub struct StructuredLogHandle { /* private fields */ }Expand description
Direct nested-JSON logger sharing an AfdataLayer’s writer and ordering.
Implementations§
Source§impl StructuredLogHandle
impl StructuredLogHandle
Sourcepub fn emit(&self, payload: Value) -> Result<()>
pub fn emit(&self, payload: Value) -> Result<()>
Emit a nested JSON log payload.
Unlike tracing’s scalar field visitor, objects and arrays stay structured. Redaction and formatting are identical to the layer.
The line carries level and timestamp_epoch_ms like every line the
layer writes, so one stream does not mix records that a level filter or
a timestamp correlation can read with records it silently drops. Supply
level in payload to override the default; the timestamp is always
stamped here, as it is for a tracing event.
Note that a writer built with a level filter (for example
io::stderr.with_max_level(..)) cannot route these events: they have no
tracing metadata to route on, so they always take the default writer.
Trait Implementations§
Source§impl Clone for StructuredLogHandle
impl Clone for StructuredLogHandle
Source§fn clone(&self) -> StructuredLogHandle
fn clone(&self) -> StructuredLogHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StructuredLogHandle
impl RefUnwindSafe for StructuredLogHandle
impl Send for StructuredLogHandle
impl Sync for StructuredLogHandle
impl Unpin for StructuredLogHandle
impl UnsafeUnpin for StructuredLogHandle
impl UnwindSafe for StructuredLogHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more