Skip to content

Commit

Permalink
devenv: apply tracing filter as a separate layer
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Nov 26, 2024
1 parent 2c48fa5 commit 6f2f04c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions devenv/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,17 @@ pub fn init_tracing(level: Level) {
tracing_subscriber::fmt::layer()
.with_writer(stderr)
.with_ansi(ansi)
.with_filter(filter)
.boxed()
} else {
tracing_subscriber::fmt::layer()
.event_format(DevenvFormat::default())
.with_writer(stderr)
.with_ansi(ansi)
.with_filter(filter)
.boxed()
};

tracing_subscriber::registry()
.with(filter)
.with(stderr_layer)
.with(devenv_layer) // The order is crucial
.init();
Expand Down

0 comments on commit 6f2f04c

Please sign in to comment.