single-source for defaulty log filter string

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-05-31 05:39:51 +00:00
parent 102bd1b4a6
commit 7d2f510cc3
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
use std::sync::Arc;
use conduit::{
config,
config::Config,
info,
log::{LogLevelReloadHandles, ReloadHandle},
@ -103,7 +104,7 @@ fn init_tracing(config: &Config) -> (LogLevelReloadHandles, TracingFlameGuard) {
Ok(s) => s,
Err(e) => {
eprintln!("It looks like your config is invalid. The following error occured while parsing it: {e}");
EnvFilter::try_new("warn").unwrap()
EnvFilter::try_new(config::default_log()).expect("failed to set default EnvFilter")
},
};