Trait artifact::format::MessageFormatter [] [src]

pub trait MessageFormatter: Send + Sync {
    fn format_message(&self, logger_name: &str, level_string: &str, message: &str) -> String;
    fn add_logger_name_to_multi_message(&self, logger_name: &str, formatted_multi_msg: &str) -> String;
    fn add_defaulting_name_to_message(&self, default_logger_name: &str, formatted_msg: &str) -> String;
}

Trait for things that can format logging messages

Required Methods

fn format_message(&self, logger_name: &str, level_string: &str, message: &str) -> String

Format a standard message.

fn add_logger_name_to_multi_message(&self, logger_name: &str, formatted_multi_msg: &str) -> String

Format for messages being sent onward by a multi-logger. logger_name is the name of the next logger. formatted_multi_msg is the message as formatted by the multi-logger's format_message method.

fn add_defaulting_name_to_message(&self, default_logger_name: &str, formatted_msg: &str) -> String

Implementors