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
sourceimpl 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 RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more