Trait log4rs::encode::Encode [] [src]

pub trait Encode: Debug + Send + Sync + 'static {
    fn encode(&self, w: &mut Write, record: &LogRecord) -> Result<()>;
}

A trait implemented by types that can serialize a LogRecord into a Writer.

Encoders are commonly used by Appenders to format a log record for output.

Required Methods

fn encode(&self, w: &mut Write, record: &LogRecord) -> Result<()>

Encodes the LogRecord into bytes and writes them.

Implementors