Skip to content

Commit

Permalink
change: log all field values default+bold by default, and log all con…
Browse files Browse the repository at this point in the history
…fig fields unpainted
  • Loading branch information
jebrosen committed Apr 16, 2021
1 parent 658e207 commit b1ab8c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions core/lib/src/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ impl Config {

let ka = self.keep_alive;
if ka > 0 {
info!(target: "rocket::support", keep_alive = %Paint::default(format!("{}s", ka)).bold());
info!(target: "rocket::support", keep_alive = %format!("{}s", ka));
} else {
info!(target: "rocket::support", keep_alive = %Paint::default("disabled").bold());
info!(target: "rocket::support", keep_alive = %"disabled");
}

info!(target: "rocket::support", limits = %&self.limits);
match self.tls_enabled() {
true => info!(target: "rocket::support", tls = %Paint::default("enabled").bold()),
false => info!(target: "rocket::support", tls = %Paint::default("disabled").bold()),
true => info!(target: "rocket::support", tls = %"enabled"),
false => info!(target: "rocket::support", tls = %"disabled"),
}

#[cfg(feature = "secrets")] {
Expand Down
2 changes: 1 addition & 1 deletion core/lib/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ where
if name == "message" {
write!(writer, "{:?}", Paint::new(value).bold())
} else {
write!(writer, "{}: {:?}", field, Paint::new(value).bold())
write!(writer, "{}: {:?}", field, Paint::default(value).bold())
}
})
.delimited(", ")
Expand Down

0 comments on commit b1ab8c1

Please sign in to comment.