pub struct TheLoggerConfig { /* private fields */ }
Expand description

TheLoggerConfig allows the user to configure on startup the logger’s output.

Implementations§

source§

impl TheLoggerConfig

source

pub async fn verbose(self) -> Self

Description

Configures the log level as verbose adding the [[VERBOSE]] tag

source

pub async fn info(self) -> Self

Description

Configures the log level as informational adding the [[INFO]] tag

source

pub async fn error(self) -> Self

Description

Configures the log level as error adding the [[ERROR]] tag

source

pub async fn warning(self) -> Self

Description

Configures the log level as warning adding the [[WARNING]] tag

source

pub async fn debug(self) -> Self

Description

Configures the log level as debug adding the [[DEBUG]] tag

source

pub async fn trace(self) -> Self

Description

Configures the log level as trace adding the [[TRACE]] tag

source

pub async fn critical(self) -> Self

Description

Configures the log level as critical adding the [[CRITICAL]] tag

source

pub fn hide_years(self) -> Self

Description

Configures the log date to hide the years. Default is to show them

source

pub fn hide_months(self) -> Self

Description

Configures the log date to hide the months. Default is to show them

source

pub fn hide_days(self) -> Self

Description

Configures the log date to hide the days. Default is to show them

source

pub fn hide_hours(self) -> Self

Description

Configures the log time to hide the hours. Default is to show them

source

pub fn hide_minutes(self) -> Self

Description

Configures the log time to hide the minutes. Default is to show them

source

pub fn hide_seconds(self) -> Self

Description

Configures the log time to hide the seconds. Default is to show them

source

pub fn hide_millisecs(self) -> Self

Description

Configures the log time to hide the milliseconds. Default is to show them

Warning

Hiding the milliseconds and showing the microseconds would cause an unexpected time tracking in the logs,

therefore, in this specific case, both milliseconds and microseconds will be hidden

source

pub fn hide_microsecs(self) -> Self

Description

Configures the log time to hide the microseconds. Default is to show them

Warning

Hiding the milliseconds and showing the microseconds would cause an unexpected time tracking in the logs,

therefore, in this specific case, both milliseconds and microseconds will be hidden

source

pub fn utc_time(self) -> Self

Description

Configures the log timezone to UTC format. Default is Local time

source

pub fn hide_level(self) -> Self

Description

Configures the log level to be hidden. Default is to show it

source

pub fn hide_file_name(self) -> Self

Description

Configures the log file location to be hidden. Default is to show it

source

pub fn hide_file_line(self) -> Self

Description

Configures the log file line number to be hidden. Default is to show it

source

pub fn hide_file_column(self) -> Self

Description

Configures the log file column number to be hidden. Default is to hide it

source

pub fn show_years(self) -> Self

Description

Configures the log date to show the years. Default is to show them

source

pub fn show_months(self) -> Self

Description

Configures the log date to show the months. Default is to show them

source

pub fn show_days(self) -> Self

Description

Configures the log date to show the days. Default is to show them

source

pub fn show_hours(self) -> Self

Description

Configures the log time to show the hours. Default is to show them

source

pub fn show_minutes(self) -> Self

Description

Configures the log time to show the minutes. Default is to show them

source

pub fn show_seconds(self) -> Self

Description

Configures the log time to show the seconds. Default is to show them

source

pub fn show_millisecs(self) -> Self

Description

Configures the log time to show the milliseconds. Default is to show them

Warning

Hiding the milliseconds and showing the microseconds would cause an unexpected time tracking in the logs,

therefore, in this specific case, both milliseconds and microseconds will be hidden

source

pub fn show_microsecs(self) -> Self

Description

Configures the log time to show the microseconds. Default is to show them

Warning

Hiding the milliseconds and showing the microseconds would cause an unexpected time tracking in the logs,

therefore, in this specific case, both milliseconds and microseconds will be hidden

source

pub fn local_time(self) -> Self

Description

Configures the log timezone to Local format. Default is Local time

source

pub fn show_level(self) -> Self

Description

Configures the log level to be shown. Default is to show it

source

pub fn show_file_name(self) -> Self

Description

Configures the log file location to be shown. Default is to show it

source

pub fn show_file_line(self) -> Self

Description

Configures the log file line number to be shown. Default is to show it

source

pub fn show_file_column(self) -> Self

Description

Configures the log file column number to be shown. Default is to hide it

source

pub fn location_content_length(self, length: usize) -> Self

Description

Configures the log file name, line and column location content’s length. Default is 100 characters

source

pub fn log_content_length(self, length: usize) -> Self

Description

Configures the log message content’s length. Default is 300 characters

Trait Implementations§

source§

impl Debug for TheLoggerConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TheLoggerConfig

source§

fn default() -> Self

Custom implementation of the default trait to include default length values for location and log content text

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.