pub struct Logger { /* private fields */ }Expand description
A named logger with a runtime severity threshold.
Threshold defaults to Severity::Info. Use register_logger
to publish a 'static Logger so multiple call sites with the
same name share the same threshold.
Implementations§
Source§impl Logger
impl Logger
Sourcepub const fn new(name: &'static str) -> Self
pub const fn new(name: &'static str) -> Self
const-construct with the default threshold (Severity::Info).
Sourcepub const fn with_level(name: &'static str, level: Severity) -> Self
pub const fn with_level(name: &'static str, level: Severity) -> Self
const-construct with an explicit threshold.
Sourcepub fn is_enabled(&self, severity: Severity) -> bool
pub fn is_enabled(&self, severity: Severity) -> bool
Whether a record at severity would be emitted by this
logger AT RUNTIME.
Auto Trait Implementations§
impl !Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnsafeUnpin 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