pub struct AsyncLogger { /* private fields */ }
Expand description
Asynchronous logger
The very first time a message is logged on a channel in a thread, a copy of the sending end of the channel is made, requiring a single mutex lock and clone. For further calls, this sending end is cached as a thread local.
§Panics
Logging may panic in the unlikely event the lock becomes poisoned upon logging from a new thread.
Implementations§
Source§impl AsyncLogger
impl AsyncLogger
Sourcepub fn new(bufsize: usize) -> (AsyncLogger, Receiver<LogMessage>)
pub fn new(bufsize: usize) -> (AsyncLogger, Receiver<LogMessage>)
Creates a new logger.
bufsize
denotes the queue size before messages are
dropped without being handled.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AsyncLogger
impl RefUnwindSafe for AsyncLogger
impl Send for AsyncLogger
impl Sync for AsyncLogger
impl Unpin for AsyncLogger
impl UnwindSafe for AsyncLogger
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