Struct ConfigurableFormat

pub struct ConfigurableFormat { /* private fields */ }

A [custom format][crate::Builder::format] with settings for which fields to show

Implementations

impl ConfigurableFormat

fn format(&self, formatter: &mut Formatter, record: &Record<'_>) -> Result<()>

Format the Record as configured for outputting

impl ConfigurableFormat

fn level(&mut self, write: bool) -> &mut Self

Whether or not to write the level in the default format.

fn file(&mut self, write: bool) -> &mut Self

Whether or not to write the source file path in the default format.

fn line_number(&mut self, write: bool) -> &mut Self

Whether or not to write the source line number path in the default format.

Only has effect if format_file is also enabled

fn module_path(&mut self, write: bool) -> &mut Self

Whether or not to write the module path in the default format.

fn target(&mut self, write: bool) -> &mut Self

Whether or not to write the target in the default format.

fn indent(&mut self, indent: Option<usize>) -> &mut Self

Configures the amount of spaces to use to indent multiline log records. A value of None disables any kind of indentation.

fn timestamp(&mut self, timestamp: Option<TimestampPrecision>) -> &mut Self

Configures if timestamp should be included and in what precision.

fn suffix(&mut self, suffix: &'static str) -> &mut Self

Configures the end of line suffix.

Trait Implementations

impl Default for ConfigurableFormat

fn default() -> Self

Auto Trait Implementations

impl Freeze for ConfigurableFormat

impl RefUnwindSafe for ConfigurableFormat

impl Send for ConfigurableFormat

impl Sync for ConfigurableFormat

impl Unpin for ConfigurableFormat

impl UnsafeUnpin for ConfigurableFormat

impl UnwindSafe for ConfigurableFormat

Blanket Implementations

impl<T> Any for ConfigurableFormat where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ConfigurableFormat where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ConfigurableFormat where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ConfigurableFormat

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for ConfigurableFormat where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ConfigurableFormat where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ConfigurableFormat where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>