Struct slog_stream::AsyncStreamer
[−]
[src]
pub struct AsyncStreamer<F: Format> { // some fields omitted }
Drain formating records and writing them to a byte-stream (io::Write
)
asynchronously.
Internally, new thread will be spawned taking care of actually writing the data.
Methods
impl<F: Format> AsyncStreamer<F>
[src]
fn new<W: Write + Send + 'static>(io: W, format: F) -> Self
Create new AsyncStreamer
writing to io
using format
Trait Implementations
impl<F: Format + Send> Drain for AsyncStreamer<F>
[src]
type Error = Error
Type of potential error returned during logging
fn log(&self, info: &Record, logger_values: &OwnedKeyValueList) -> Result<()>
Write one logging record As an optimization (avoiding allocations), loggers are responsible for providing a byte buffer, that Drain
can use for their own needs. Read more