pub struct Logger { /* private fields */ }Expand description
A styled logger.
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn with_timestamp(self) -> Self
pub fn with_timestamp(self) -> Self
Enable timestamps.
Sourcepub fn with_icons(self) -> Self
pub fn with_icons(self) -> Self
Enable icons.
Sourcepub fn log_kv(&self, level: Level, message: &str, kvs: &[(&str, &dyn Display)])
pub fn log_kv(&self, level: Level, message: &str, kvs: &[(&str, &dyn Display)])
Log with key-value pairs.
Sourcepub fn debug_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
pub fn debug_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
Log at debug level with key-value pairs.
Sourcepub fn info_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
pub fn info_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
Log at info level with key-value pairs.
Sourcepub fn warn_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
pub fn warn_kv(&self, message: &str, kvs: &[(&str, &dyn Display)])
Log at warn level with key-value pairs.
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)