Struct ulog::AsyncLogger
[−]
[src]
pub struct AsyncLogger { /* fields omitted */ }
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.
Methods
impl AsyncLogger
[src]
fn new(bufsize: usize) -> (AsyncLogger, Receiver<LogMessage>)
Creates a new logger.
bufsize
denotes the queue size before messages are
dropped without being handled.
fn failures(&self) -> usize
Number of dropped log messages.