pub struct Formatter { /* private fields */ }
Expand description
A formatter that can format log records
Implementations§
Source§impl Formatter
impl Formatter
Sourcepub fn format_batch(&self, records: &[Record]) -> String
pub fn format_batch(&self, records: &[Record]) -> String
Format multiple records into a string
Sourcepub fn with_colors(self, use_colors: bool) -> Self
pub fn with_colors(self, use_colors: bool) -> Self
Enable or disable colored output
Sourcepub fn with_timestamp(self, include_timestamp: bool) -> Self
pub fn with_timestamp(self, include_timestamp: bool) -> Self
Enable or disable timestamp output
Sourcepub fn with_level(self, include_level: bool) -> Self
pub fn with_level(self, include_level: bool) -> Self
Enable or disable level output
Sourcepub fn with_module(self, include_module: bool) -> Self
pub fn with_module(self, include_module: bool) -> Self
Enable or disable module output
Sourcepub fn with_location(self, include_location: bool) -> Self
pub fn with_location(self, include_location: bool) -> Self
Enable or disable location output
Sourcepub fn with_pattern(self, pattern: impl Into<String>) -> Self
pub fn with_pattern(self, pattern: impl Into<String>) -> Self
Set the pattern for formatting
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Formatter
impl !RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl !UnwindSafe for Formatter
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