tui_logger::widget::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

Implementors§