Struct mod_logger::Logger
source · pub struct Logger { /* private fields */ }
Expand description
The Logger struct holds a singleton containing all relevant information.
struct Logger has a private constructor. It is used via its static interface which will instantiate a Logger or use an existing one.
Implementations§
source§impl Logger
impl Logger
sourcepub fn set_default_level(log_level: Level)
pub fn set_default_level(log_level: Level)
Initialise a Logger with the given default log_level or modify the default log level of the existing logger
sourcepub fn get_default_level(&self) -> Level
pub fn get_default_level(&self) -> Level
Retrieve the default level of the logger
sourcepub fn set_mod_level(module: &str, log_level: Level)
pub fn set_mod_level(module: &str, log_level: Level)
Modify the log level for a module
sourcepub fn get_buffer() -> Option<Vec<u8>>
pub fn get_buffer() -> Option<Vec<u8>>
Retrieve the current log buffer, if available
sourcepub fn set_log_dest<S: 'static + Write + Send>(
dest: &LogDestination,
stream: Option<S>
) -> Result<(), Error>
pub fn set_log_dest<S: 'static + Write + Send>( dest: &LogDestination, stream: Option<S> ) -> Result<(), Error>
Set the log destination
sourcepub fn set_log_file(
log_dest: &LogDestination,
log_file: &Path,
buffered: bool
) -> Result<(), Error>
pub fn set_log_file( log_dest: &LogDestination, log_file: &Path, buffered: bool ) -> Result<(), Error>
Set log destination and log file.
sourcepub fn get_log_dest() -> LogDestination
pub fn get_log_dest() -> LogDestination
Retrieve the current log destination
sourcepub fn set_timestamp(val: bool)
pub fn set_timestamp(val: bool)
Enable / disable timestamp in messages
sourcepub fn set_millis(val: bool)
pub fn set_millis(val: bool)
Enable / disable timestamp in messages
sourcepub fn set_brief_info(val: bool)
pub fn set_brief_info(val: bool)
Enable / disable brief info messages
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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