pub struct LogRender { /* private fields */ }Expand description
Lays out log records. Port of rich._log_render.LogRender.
Implementations§
Source§impl LogRender
impl LogRender
Sourcepub fn new() -> Self
pub fn new() -> Self
Upstream’s defaults: time and path shown, level hidden, repeated times omitted, level column 8 cells wide.
Sourcepub fn show_level(self, show: bool) -> Self
pub fn show_level(self, show: bool) -> Self
Show the level column (upstream show_level).
Sourcepub fn omit_repeated_times(self, omit: bool) -> Self
pub fn omit_repeated_times(self, omit: bool) -> Self
Blank a time equal to the previous record’s (upstream
omit_repeated_times).
Sourcepub fn level_width(self, width: Option<usize>) -> Self
pub fn level_width(self, width: Option<usize>) -> Self
The level column’s width, or None to fit its content (upstream
level_width).
Sourcepub fn render(
&self,
console: &Console,
message: Text,
time: Option<Text>,
level: Text,
path: Option<&str>,
line_no: Option<u32>,
link_path: Option<&str>,
) -> Table
pub fn render( &self, console: &Console, message: Text, time: Option<Text>, level: Text, path: Option<&str>, line_no: Option<u32>, link_path: Option<&str>, ) -> Table
Lay out one record. Port of LogRender.__call__: time is the
formatted log time, level the styled level text (see level_text),
and link_path makes the path a file:// hyperlink.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LogRender
impl !RefUnwindSafe for LogRender
impl !Sync for LogRender
impl Send for LogRender
impl Unpin for LogRender
impl UnsafeUnpin for LogRender
impl UnwindSafe for LogRender
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more