Struct log4rs::encode::pattern::PatternEncoder [] [src]

pub struct PatternEncoder {
    // some fields omitted
}

An Encoder configured via a format string.

Methods

impl PatternEncoder
[src]

fn new(pattern: &str) -> PatternEncoder

Creates a PatternEncoder from a pattern string.

The pattern string syntax is documented in the pattern module.

Trait Implementations

impl Debug for PatternEncoder
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for PatternEncoder
[src]

Returns a PatternEncoder using the default pattern of {d} {l} {t} - {m}{n}.

fn default() -> PatternEncoder

Returns the "default value" for a type. Read more

impl Encode for PatternEncoder
[src]

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

Encodes the LogRecord into bytes and writes them.