Don't style debug and trace output

This commit is contained in:
Andrew 2023-07-27 08:18:23 +12:00 committed by Josh Holmer
parent 708a019ce2
commit 02bd47ba29

View file

@ -418,8 +418,8 @@ fn parse_opts_into_struct(
.filter_module(module_path!(), log_level)
.format(|buf, record| {
let style = match record.level() {
Level::Info => buf.style(),
_ => buf.default_level_style(record.level()),
Level::Error | Level::Warn => buf.default_level_style(record.level()),
_ => buf.style(), // Leave info, debug and trace unstyled
};
writeln!(buf, "{}", style.value(record.args()))
})