Struct shadow_rs::core::logger::shadow_logger::ShadowLogger
source · pub struct ShadowLogger { /* private fields */ }
Expand description
A logger specialized for Shadow.
It attaches simulation context to log entries (e.g. sim time, running process, etc.). It’s also designed for high performance to accomodate heavy logging from multiple threads.
Implementations§
source§impl ShadowLogger
impl ShadowLogger
sourcepub fn set_buffering_enabled(&self, buffering_enabled: bool)
pub fn set_buffering_enabled(&self, buffering_enabled: bool)
When disabled, the logger thread is notified to write each record as soon as it’s created. The calling thread still isn’t blocked on the record actually being written, though.
sourcepub fn max_level(&self) -> LevelFilter
pub fn max_level(&self) -> LevelFilter
If the maximum log level has not yet been set, returns LevelFilter::Trace
.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ShadowLogger
impl RefUnwindSafe for ShadowLogger
impl Send for ShadowLogger
impl Sync for ShadowLogger
impl Unpin for ShadowLogger
impl UnwindSafe for ShadowLogger
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more