Struct ConfigurableFormat
pub struct ConfigurableFormat {
pub(crate) timestamp: Option<TimestampPrecision>,
pub(crate) module_path: bool,
pub(crate) target: bool,
pub(crate) level: bool,
pub(crate) source_file: bool,
pub(crate) source_line_number: bool,
pub(crate) indent: Option<usize>,
pub(crate) suffix: &'static str,
}Expand description
A [custom format][crate::Builder::format] with settings for which fields to show
Fields§
§timestamp: Option<TimestampPrecision>§module_path: bool§target: bool§level: bool§source_file: bool§source_line_number: bool§indent: Option<usize>§suffix: &'static strImplementations§
§impl ConfigurableFormat
impl ConfigurableFormat
§impl ConfigurableFormat
impl ConfigurableFormat
pub fn level(&mut self, write: bool) -> &mut ConfigurableFormat
pub fn level(&mut self, write: bool) -> &mut ConfigurableFormat
Whether or not to write the level in the default format.
pub fn file(&mut self, write: bool) -> &mut ConfigurableFormat
pub fn file(&mut self, write: bool) -> &mut ConfigurableFormat
Whether or not to write the source file path in the default format.
pub fn line_number(&mut self, write: bool) -> &mut ConfigurableFormat
pub fn line_number(&mut self, write: bool) -> &mut ConfigurableFormat
Whether or not to write the source line number path in the default format.
Only has effect if format_file is also enabled
pub fn module_path(&mut self, write: bool) -> &mut ConfigurableFormat
pub fn module_path(&mut self, write: bool) -> &mut ConfigurableFormat
Whether or not to write the module path in the default format.
pub fn target(&mut self, write: bool) -> &mut ConfigurableFormat
pub fn target(&mut self, write: bool) -> &mut ConfigurableFormat
Whether or not to write the target in the default format.
pub fn indent(&mut self, indent: Option<usize>) -> &mut ConfigurableFormat
pub fn indent(&mut self, indent: Option<usize>) -> &mut ConfigurableFormat
Configures the amount of spaces to use to indent multiline log records.
A value of None disables any kind of indentation.
pub fn timestamp(
&mut self,
timestamp: Option<TimestampPrecision>,
) -> &mut ConfigurableFormat
pub fn timestamp( &mut self, timestamp: Option<TimestampPrecision>, ) -> &mut ConfigurableFormat
Configures if timestamp should be included and in what precision.
pub fn suffix(&mut self, suffix: &'static str) -> &mut ConfigurableFormat
pub fn suffix(&mut self, suffix: &'static str) -> &mut ConfigurableFormat
Configures the end of line suffix.
Trait Implementations§
§impl Default for ConfigurableFormat
impl Default for ConfigurableFormat
§fn default() -> ConfigurableFormat
fn default() -> ConfigurableFormat
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigurableFormat
impl RefUnwindSafe for ConfigurableFormat
impl Send for ConfigurableFormat
impl Sync for ConfigurableFormat
impl Unpin for ConfigurableFormat
impl UnwindSafe for ConfigurableFormat
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