Don't style debug and trace output
This commit is contained in:
parent
708a019ce2
commit
441f6c9f99
1 changed files with 2 additions and 2 deletions
|
|
@ -418,8 +418,8 @@ fn parse_opts_into_struct(
|
||||||
.filter_module(module_path!(), log_level)
|
.filter_module(module_path!(), log_level)
|
||||||
.format(|buf, record| {
|
.format(|buf, record| {
|
||||||
let style = match record.level() {
|
let style = match record.level() {
|
||||||
Level::Info => buf.style(),
|
Level::Error | Level::Warn => buf.default_level_style(record.level()),
|
||||||
_ => buf.default_level_style(record.level()),
|
_ => buf.style(), // Leave info, debug and trace unstyled
|
||||||
};
|
};
|
||||||
writeln!(buf, "{}", style.value(record.args()))
|
writeln!(buf, "{}", style.value(record.args()))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue