pub struct PicoLogger { /* private fields */ }
Expand description
The main logging struct
Implementations§
Source§impl PicoLogger
impl PicoLogger
Sourcepub fn new(level: LevelFilter) -> Self
pub fn new(level: LevelFilter) -> Self
Create (but not initialize!) a new logger instance. Must be initialized for the logger to take effect.
§Example
use log::{debug, LevelFilter};
use picolog::PicoLogger;
PicoLogger::new(LevelFilter::Trace).init();
debug!("hi!");
Sourcepub fn with_colors(self, colors: bool) -> Self
pub fn with_colors(self, colors: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PicoLogger
impl RefUnwindSafe for PicoLogger
impl Send for PicoLogger
impl Sync for PicoLogger
impl Unpin for PicoLogger
impl UnwindSafe for PicoLogger
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