fn colored_level<'a>(style: &'a mut Style, level: Level) -> StyledValue<'a, &'static str> {
    match level {
        Level::Trace => style.set_color(Color::Magenta).value("TRACE"),
        Level::Debug => style.set_color(Color::Blue).value("DEBUG"),
        Level::Info => style.set_color(Color::Green).value("INFO "),
        Level::Warn => style.set_color(Color::Yellow).value("WARN "),
        Level::Error => style.set_color(Color::Red).value("ERROR"),
    }
}
// Change style based on the message log level
Change style based on the message log level
Change style based on the message log level
fn colored_level<'a>(style: &'a mut Style, level: Level) -> StyledValue<'a, &'static str> {
    match level {
        Level::Trace => style.set_color(Color::Magenta).value("TRACE"),
        Level::Debug => style.set_color(Color::Blue).value("DEBUG"),
        Level::Info => style.set_color(Color::Green).value("INFO "),
        Level::Warn => style.set_color(Color::Yellow).value("WARN "),
        Level::Error => style.set_color(Color::Red).value("ERROR"),
    }
}
fn colored_level < ' a > ( style : & ' a mut Style , level : Level ) -> StyledValue < ' a , & ' static str > { match level { Level :: Trace => style . set_color ( Color :: Magenta ) . value ( " " ) , Level :: Debug => style . set_color ( Color :: Blue ) . value ( " " ) , Level :: Info => style . set_color ( Color :: Green ) . value ( " " ) , Level :: Warn => style . set_color ( Color :: Yellow ) . value ( " " ) , Level :: Error => style . set_color ( Color :: Red ) . value ( " " ) , } }
Change style based on the message log level
Change style based on the message log level
style
&'a mut Style
level
Level