pub fn default_level_color(level: &Level, msg: &str) -> String
Expand description
Format a message for a particular log level
§Parameters
level
: The log level of the messagemsg
: The message text
§Returns
A String
which is formatted according to the level. Typically, this
is done by wrapping the string in terminal color codes, appropriate for
the log level.
§Defaults
Level | Color |
---|---|
Level::Error | red |
Level::Warn | yellow |
Level::Info | green |
Level::Debug | green |
Level::Trace | magenta |