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]

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 of potential errors returned during logging

Log one logging record Read more

impl Drop for Async
[src]

A method called when the value goes out of scope. Read more