Skip to content

Commit 8bdd972

Browse files
CAD97kaffarell
authored andcommitted
subscriber: <None as Layer>::event_enabled should be true (tokio-rs#2193)
## Motivation This is wrong. ## Solution Make it unwrong. As described by the documentation on `Layer::event_enabled`, the return value sets the global filtering of an event. This code used to say that that `Option::<impl Layer>::None` existing in the layer stack should disable any layer in the stack seeing events
1 parent 9b8b2b4 commit 8bdd972

File tree

1 file changed

+1
-1
lines changed
  • tracing-subscriber/src/layer

1 file changed

+1
-1
lines changed

tracing-subscriber/src/layer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ where
15121512
fn event_enabled(&self, event: &Event<'_>, ctx: Context<'_, S>) -> bool {
15131513
match self {
15141514
Some(ref inner) => inner.event_enabled(event, ctx),
1515-
None => false,
1515+
None => true,
15161516
}
15171517
}
15181518

0 commit comments

Comments
 (0)