Skip to content

Commit

Permalink
pattern encoder: Set trace to default color, reset formatting after (#…
Browse files Browse the repository at this point in the history
…186)

* pattern encoder: Set trace to default color, reset formatting after

* Fix formatting of last commit

* lol apparently rustfmt doesn't like commas? idk if this will work

* Set trace color to cyan
  • Loading branch information
judemille committed Dec 16, 2020
1 parent d6ddbb1 commit 36627ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/encode/pattern/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,16 @@ impl FormattedChunk {
}
Level::Warn => w.set_style(Style::new().text(Color::Yellow))?,
Level::Info => w.set_style(Style::new().text(Color::Green))?,
Level::Trace => w.set_style(Style::new().text(Color::Black).intense(true))?,
Level::Trace => w.set_style(Style::new().text(Color::Cyan))?,
_ => {}
}
for chunk in chunks {
chunk.encode(w, record)?;
}
match record.level() {
Level::Error | Level::Warn | Level::Info => w.set_style(&Style::new())?,
Level::Error | Level::Warn | Level::Info | Level::Trace => {
w.set_style(&Style::new())?
}
_ => {}
}
Ok(())
Expand Down

0 comments on commit 36627ba

Please sign in to comment.