[go: up one dir, main page]

default_level_color

Function default_level_color 

Source
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 message
  • msg: 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

LevelColor
Level::Errorred
Level::Warnyellow
Level::Infogreen
Level::Debuggreen
Level::Tracemagenta