pub struct JsonFormatter { /* private fields */ }Expand description
A JSON formatter that formats log records as JSON
Implementations§
Source§impl JsonFormatter
impl JsonFormatter
Trait Implementations§
Source§impl Clone for JsonFormatter
impl Clone for JsonFormatter
Source§fn clone(&self) -> JsonFormatter
fn clone(&self) -> JsonFormatter
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonFormatter
impl Debug for JsonFormatter
Source§impl Default for JsonFormatter
impl Default for JsonFormatter
Source§impl FormatterTrait for JsonFormatter
impl FormatterTrait for JsonFormatter
Source§fn with_colors(self, _use_colors: bool) -> Self
fn with_colors(self, _use_colors: bool) -> Self
Set whether to use colors
Source§fn with_timestamp(self, include_timestamp: bool) -> Self
fn with_timestamp(self, include_timestamp: bool) -> Self
Set whether to include timestamps
Source§fn with_level(self, include_level: bool) -> Self
fn with_level(self, include_level: bool) -> Self
Set whether to include the log level
Source§fn with_module(self, include_module: bool) -> Self
fn with_module(self, include_module: bool) -> Self
Set whether to include the module path
Source§fn with_location(self, include_location: bool) -> Self
fn with_location(self, include_location: bool) -> Self
Set whether to include the file and line number
Source§fn with_pattern(self, pattern: impl Into<String>) -> Self
fn with_pattern(self, pattern: impl Into<String>) -> Self
Set the format pattern
Source§fn with_format<F>(self, format_fn: F) -> Self
fn with_format<F>(self, format_fn: F) -> Self
Set a custom format function
Auto Trait Implementations§
impl Freeze for JsonFormatter
impl !RefUnwindSafe for JsonFormatter
impl Send for JsonFormatter
impl Sync for JsonFormatter
impl Unpin for JsonFormatter
impl !UnwindSafe for JsonFormatter
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