Trait EventFormatter

Source
pub trait EventFormatter {
    // Required method
    fn format_event<S>(
        &self,
        event: &Event<'_>,
        ctx: Context<'_, S>,
        info: ContextInfo<'_>,
    ) -> Result<Vec<u8>, Error>
       where S: Subscriber + for<'a> LookupSpan<'a>;
}
Expand description

EventFormatter allows you to customise the format of tracing::Event if the json-logger feature is active

Required Methods§

Source

fn format_event<S>( &self, event: &Event<'_>, ctx: Context<'_, S>, info: ContextInfo<'_>, ) -> Result<Vec<u8>, Error>
where S: Subscriber + for<'a> LookupSpan<'a>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§