diff --git a/tokio-trace-fmt/src/filter/env.rs b/tokio-trace-fmt/src/filter/env.rs index f0415bf4e9..00b12308b5 100644 --- a/tokio-trace-fmt/src/filter/env.rs +++ b/tokio-trace-fmt/src/filter/env.rs @@ -99,13 +99,13 @@ where impl Filter for EnvFilter { fn callsite_enabled(&self, metadata: &Metadata, _: &Context) -> Interest { - if !self.includes_span_directive && self.max_level <= *metadata.level() { + if !self.includes_span_directive && self.max_level < *metadata.level() { return Interest::never(); } let mut interest = Interest::never(); for directive in self.directives_for(metadata) { - let accepts_level = directive.level > *metadata.level(); + let accepts_level = directive.level >= *metadata.level(); match directive.in_span.as_ref() { // The directive applies to anything within the span described // by this metadata. The span must always be enabled. @@ -129,7 +129,7 @@ impl Filter for EnvFilter { fn enabled<'a>(&self, metadata: &Metadata, ctx: &Context<'a, N>) -> bool { for directive in self.directives_for(metadata) { - let accepts_level = directive.level > *metadata.level(); + let accepts_level = directive.level >= *metadata.level(); match directive.in_span.as_ref() { // The directive applies to anything within the span described // by this metadata. The span must always be enabled.