Skip to content

Commit

Permalink
fix: uses default info if RUST_LOG is not set (#863)
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan authored Mar 5, 2024
1 parent 31bdced commit 4d8440a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions core/src/trace/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,9 @@ impl Config {

impl Default for Config {
fn default() -> Self {
match std::env::var("RUST_LOG") {
Ok(val) => {
if val.is_empty() {
val.into()
} else {
"info".to_owned().into()
}
}
Err(_) => "info".to_owned().into(),
}
std::env::var("RUST_LOG")
.unwrap_or("info".to_owned())
.into()
}
}

Expand Down

0 comments on commit 4d8440a

Please sign in to comment.