Struct log_reload::ReloadLog
source · pub struct ReloadLog<T> { /* private fields */ }
Expand description
A logger which can dynamically reload an inner logger.
This enables applications to dyanmically change e.g. the log output or log level.
Implementations§
Trait Implementations§
source§impl<T: Log> Log for ReloadLog<T>
impl<T: Log> Log for ReloadLog<T>
source§fn enabled(&self, metadata: &Metadata<'_>) -> bool
fn enabled(&self, metadata: &Metadata<'_>) -> bool
Whether the underlying logger is enabled.
Always return false
if the RwLock
protecting the inner logger is poisoned,
because we can’t trust that the inner logger is valid if a panic occurred
while it was modified, so we indicate that this logger shouldn’t be used at all.
Auto Trait Implementations§
impl<T> RefUnwindSafe for ReloadLog<T>
impl<T> Send for ReloadLog<T>where T: Send + Sync,
impl<T> Sync for ReloadLog<T>where T: Send + Sync,
impl<T> Unpin for ReloadLog<T>
impl<T> UnwindSafe for ReloadLog<T>
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