From 4d8440abee62d38205257acc525a99168d69e89c Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:41:55 +0100 Subject: [PATCH] fix: uses default info if RUST_LOG is not set (#863) Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- core/src/trace/config.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/core/src/trace/config.rs b/core/src/trace/config.rs index 152a25de..2fc1950c 100644 --- a/core/src/trace/config.rs +++ b/core/src/trace/config.rs @@ -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() } }