pub struct Logger;Expand description
Simple Logger implementation
It provides logger without filtering with following format:
<level> [<date and time>] {<file>:<line>} - <args>
Timestamp is only used on std environment aside from Android.
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn set_log_env_or(&self, default_level: LevelFilter)
pub fn set_log_env_or(&self, default_level: LevelFilter)
Sets log max level from RUST_LOG or if not available, use provided default level.
Requires std feature
Sourcepub fn set_max_level(&self, level: LevelFilter)
pub fn set_max_level(&self, level: LevelFilter)
Sets log max level, controlling which level to print at most.
By default it is off.
Sourcepub fn set_logger(&'static self) -> Result<(), SetLoggerError>
pub fn set_logger(&'static self) -> Result<(), SetLoggerError>
Initialize self as log global logger.
Sourcepub fn set_logger_debug(&'static self) -> Result<(), SetLoggerError>
pub fn set_logger_debug(&'static self) -> Result<(), SetLoggerError>
Initialize self as log global logger in debug mode only.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Logger
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