tui_logger/widget/
logformatter.rs

1use crate::ExtLogRecord;
2use ratatui::text::Line;
3
4pub trait LogFormatter: Send + Sync {
5    fn min_width(&self) -> u16;
6
7    /// This must format any event in one or more lines.
8    /// Correct wrapping in next line with/without indenting must be performed here.
9    /// The parameter width is the available line width
10    fn format(&self, width: usize, evt: &ExtLogRecord) -> Vec<Line>;
11}