Struct slog_extra::Async
[−]
[src]
pub struct Async { /* fields omitted */ }
Async
drain
Async
will send all the logging records to a wrapped drain running in another thread.
Note: Dropping Async
waits for it's worker-thread to finish (thus handle all previous
requests). If you can't tolerate the delay, make sure you drop Async
drain instance eg. in
another thread.
Methods
impl Async
[src]
fn new<D: Drain<Error = Never> + Send + 'static>(drain: D) -> Self
Create Async
drain
The wrapped drain must handle all error conditions (Drain<Error=Never>
). See
slog::DrainExt::fuse()
and slog::DrainExt::ignore_err()
for typical error handling
strategies.
Trait Implementations
impl Drain for Async
[src]
type Error = Error
Type of potential errors returned during logging
fn log(&self, record: &Record, logger_values: &OwnedKeyValueList) -> Result<()>
Log one logging record Read more