Skip to content

Commit

Permalink
tracing: Fix RUST_LOG parsing
Browse files Browse the repository at this point in the history
This used to work and I'm not exactly sure what changed. For some reason
`with_env_filter` needs to be at the end of the chain for the RUST_LOG
env var parsing to work.

Signed-off-by: ckyrouac <[email protected]>
  • Loading branch information
ckyrouac committed Feb 25, 2025
1 parent b088833 commit d3959e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/src/tracing_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub fn initialize_tracing() {
.compact();
// Log to stderr by default
tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.event_format(format)
.with_writer(std::io::stderr)
.with_max_level(tracing::Level::WARN)
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.init();
}

0 comments on commit d3959e5

Please sign in to comment.