Skip to main content

LogFormatter

Trait LogFormatter 

Source
pub trait LogFormatter: Send + Sync {
    // Required methods
    fn min_width(&self) -> u16;
    fn format(&self, width: usize, evt: &ExtLogRecord) -> Vec<Line<'_>>;
}

Required Methods§

Source

fn min_width(&self) -> u16

Source

fn format(&self, width: usize, evt: &ExtLogRecord) -> Vec<Line<'_>>

This must format any event in one or more lines. Correct wrapping in next line with/without indenting must be performed here. The parameter width is the available line width

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§