Trait slog::drain::Drain [] [src]

pub trait Drain: Send + Sync {
    fn log(&self, buf: &mut Vec<u8>, info: &RecordInfo, &OwnedKeyValueNode) -> Result<()>;
}

Drain for Loggers

Implementing this trait allows writing own Drains

Required Methods

fn log(&self, buf: &mut Vec<u8>, info: &RecordInfo, &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.

Implementors