Struct dzahui::logger::DzahuiLogger

source ·
pub struct DzahuiLogger {
    print_to_term: bool,
    print_to_file: bool,
    tx: SyncSender<String>,
    logger_id: &'static str,
}
Expand description

General Information

Logger structure for Dzahui

Fields

  • print_to_term - Wether log should be printed to standard exit or not
  • print_to_file - Wether log should be written to file
  • tx - Communication between thread from logs and the rest of Dzahui
  • logger_id - String to print on log

Fields§

§print_to_term: bool§print_to_file: bool§tx: SyncSender<String>§logger_id: &'static str

Implementations§

General Information

Creates a new instance of a logger. Will print to term if file is not provided

Parameters
  • logger_id - An id for this instance
  • print_to_term - Wether to print to terminal or not
  • log_path - Where to store logs

Trait Implementations§

General Information

Indicates which level of log will be used

Parameters
  • &self - to acess method via ‘.’
  • metadata - to check metadata level
General Information

Deals with every log on an individual manner

Parameters
  • &self - An instance to check some internal state variables
  • record - Payload of a log message to record

Empty function

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.