[][src]Trait tracing_fmt::FormatEvent

pub trait FormatEvent<N> {
    fn format_event(
        &self,
        ctx: &Context<N>,
        writer: &mut dyn Write,
        event: &Event
    ) -> Result; }

A type that can format a tracing Event for a fmt::Write.

FormatEvent is primarily used in the context of [FmtSubscriber]. Each time an event is dispatched to [FmtSubscriber], the subscriber forwards it to its associated FormatEvent to emit a log message.

This trait is already implemented for function pointers with the same signature as format.

Required methods

fn format_event(
    &self,
    ctx: &Context<N>,
    writer: &mut dyn Write,
    event: &Event
) -> Result

Write a log message for Event in Context to the given Write.

Loading content...

Implementations on Foreign Types

impl<N> FormatEvent<N> for fn(_: &Context<N>, _: &mut dyn Write, _: &Event) -> Result[src]

Loading content...

Implementors

impl<N, T> FormatEvent<N> for Format<Compact, T> where
    N: for<'a> NewVisitor<'a>,
    T: FormatTime
[src]

impl<N, T> FormatEvent<N> for Format<Full, T> where
    N: for<'a> NewVisitor<'a>,
    T: FormatTime
[src]

Loading content...