Skip to content

Commit 6607cef

Browse files
committed
fix env logger init
1 parent f1067e9 commit 6607cef

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ launch:
1111

1212
.PHONY: run # | Run with INFO logs
1313
run:
14-
RUST_LOG=none,dkn_compute=info,dkn_workflows=info,dkn_p2p=info cargo run
14+
cargo run
1515

1616
.PHONY: debug # | Run with DEBUG logs with INFO log-level workflows
1717
debug:

compute/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ async fn main() -> Result<()> {
99

1010
env_logger::builder()
1111
.format_timestamp(Some(env_logger::TimestampPrecision::Millis))
12+
.filter(None, log::LevelFilter::Off)
13+
.filter_module("dkn_compute", log::LevelFilter::Info)
14+
.filter_module("dkn_p2p", log::LevelFilter::Info)
15+
.filter_module("dkn_workflows", log::LevelFilter::Info)
16+
.parse_default_env() // reads RUST_LOG variable
1217
.init();
1318
if let Err(e) = dotenv_result {
1419
log::warn!("could not load .env file: {}", e);

0 commit comments

Comments
 (0)