pub struct Logger {
default_level: LevelFilter,
}
Expand description
A custom logger struct that uses stdout to print logs.
Example
extern crate log;
use crate::logger::logger::Logger;
fn main() {
Logger::init(Some(log::LevelFilter::Debug));
log::debug!("This is a debug message");
}
Fields§
§default_level: LevelFilter
The default level of the logger.
Implementations§
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