Struct slog::drain::Streamer
[−]
[src]
pub struct Streamer<W: Write, F: Format> { // some fields omitted }
Drain formating records and writing them to a byte-stream (io::Write)
Uses mutex to serialize writes. TODO: Add one that does not serialize?
Methods
impl<W: Write, F: Format> Streamer<W, F>
[src]
fn new(io: W, format: F) -> Self
Create new Streamer
writing to io
using format
Trait Implementations
impl<W: 'static + Write + Send, F: Format + Send> Drain for Streamer<W, F>
[src]
fn log(&self, buf: &mut Vec<u8>, info: &RecordInfo, logger_values: &OwnedKeyValueNode) -> 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