Trait Formatter

Source
pub trait Formatter: Send + Sync {
    // Required method
    fn format(&self, record: &Record) -> String;
}
Expand description

Defines a log message formatter.

Formatters are responsible for converting a log record into a formatted string that can be written to output targets.

Required Methods§

Source

fn format(&self, record: &Record) -> String

Formats a log record into a string.

§Arguments
  • record - The log record to format
§Returns

A formatted string representation of the log record

Implementors§