Trait LogFormatter

Source
pub trait LogFormatter {
    // Required methods
    fn from_log_layer<W: for<'a> MakeWriter<'a> + 'static, F: LogFormatter + Default>(
        layer: &LogLayer<W, F>,
    ) -> Self;
    fn format_event<S: Subscriber + for<'a> LookupSpan<'a>>(
        &mut self,
        current_span: &Option<SpanRef<'_, S>>,
        event: &Event<'_>,
        event_visitor: &Storage<'_>,
    ) -> String;
    fn format_span<S: Subscriber + for<'a> LookupSpan<'a>>(
        &mut self,
        span: &SpanRef<'_, S>,
        ty: Type,
    ) -> String;
}

Required Methods§

Source

fn from_log_layer<W: for<'a> MakeWriter<'a> + 'static, F: LogFormatter + Default>( layer: &LogLayer<W, F>, ) -> Self

Source

fn format_event<S: Subscriber + for<'a> LookupSpan<'a>>( &mut self, current_span: &Option<SpanRef<'_, S>>, event: &Event<'_>, event_visitor: &Storage<'_>, ) -> String

Source

fn format_span<S: Subscriber + for<'a> LookupSpan<'a>>( &mut self, span: &SpanRef<'_, S>, ty: Type, ) -> String

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§