diff options
Diffstat (limited to 'vendor/tracing-subscriber/src/reload.rs')
-rw-r--r-- | vendor/tracing-subscriber/src/reload.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vendor/tracing-subscriber/src/reload.rs b/vendor/tracing-subscriber/src/reload.rs index 3d1743440..0c6c1c45c 100644 --- a/vendor/tracing-subscriber/src/reload.rs +++ b/vendor/tracing-subscriber/src/reload.rs @@ -75,7 +75,7 @@ use std::{ use tracing_core::{ callsite, span, subscriber::{Interest, Subscriber}, - Event, Metadata, + Event, LevelFilter, Metadata, }; /// Wraps a `Layer` or `Filter`, allowing it to be reloaded dynamically at runtime. @@ -173,6 +173,11 @@ where fn on_id_change(&self, old: &span::Id, new: &span::Id, ctx: layer::Context<'_, S>) { try_lock!(self.inner.read()).on_id_change(old, new, ctx) } + + #[inline] + fn max_level_hint(&self) -> Option<LevelFilter> { + try_lock!(self.inner.read(), else return None).max_level_hint() + } } // ===== impl Filter ===== @@ -218,6 +223,11 @@ where fn on_close(&self, id: span::Id, ctx: layer::Context<'_, S>) { try_lock!(self.inner.read()).on_close(id, ctx) } + + #[inline] + fn max_level_hint(&self) -> Option<LevelFilter> { + try_lock!(self.inner.read(), else return None).max_level_hint() + } } impl<L, S> Layer<L, S> { |