mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +00:00
subscriber: Forward current_span impl for Layered (#350)
This overrides the default `Subscriber::current_span` impl with one that forwards the inner subscribers implementation. This fixes bugs where the current_span was not fetchable when using the `FmtSubscriber`. Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
This commit is contained in:
parent
cc70560a75
commit
67689dfe21
@ -501,6 +501,11 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn current_span(&self) -> span::Current {
|
||||
self.inner.current_span()
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()> {
|
||||
self.layer
|
||||
|
Loading…
x
Reference in New Issue
Block a user