pub trait Formatter {
// Required method
fn format(&self, level: Level, color: bool, msg: String);
}
Expand description
A trait for custom log formatters.
Required Methods§
sourcefn format(&self, level: Level, color: bool, msg: String)
fn format(&self, level: Level, color: bool, msg: String)
Processes a log message. This will usually print the message to stdout, write it to a file, or pass it to another logging system.
Note: Only log messages with a level equal to or higher than the global log level will be passed to the formatter.