diff --git a/Cargo.toml b/Cargo.toml index 50cae58c..935451ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c # Logging tracing = "0.1.37" -tracing-subscriber = "0.3.17" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } tracing-appender = "0.2.2" # Testing and Mocking @@ -76,4 +76,4 @@ thiserror = "1.0.49" uuid = { version = "1.5", features = ["fast-rng", "v4"] } # Broadcasting -fiber = { git = "https://github.com/chainbound/fiber-rs.git", tag = "v0.5.1" } \ No newline at end of file +fiber = { git = "https://github.com/chainbound/fiber-rs.git", tag = "v0.5.1" } diff --git a/crates/cmd/src/main.rs b/crates/cmd/src/main.rs index e9ee557a..07357700 100644 --- a/crates/cmd/src/main.rs +++ b/crates/cmd/src/main.rs @@ -15,7 +15,11 @@ async fn run() { match &config.logging { LoggingConfig::Console => { - tracing_subscriber::fmt().init(); + let filter_layer = tracing_subscriber::EnvFilter::from_default_env(); + + tracing_subscriber::fmt() + .with_env_filter(filter_layer) + .init(); } LoggingConfig::File { dir_path, file_name } => { let file_appender = tracing_appender::rolling::daily(dir_path, file_name);