Lines Matching full:subscriber
2 pub use tracing_core::subscriber::*;
8 /// Sets this [`Subscriber`] as the default for the current thread for the
11 /// The default subscriber is used when creating a new [`Span`] or
16 /// [`Subscriber`]: super::subscriber::Subscriber
20 pub fn with_default<T, S>(subscriber: S, f: impl FnOnce() -> T) -> T in with_default()
22 S: Subscriber + Send + Sync + 'static, in with_default()
24 crate::dispatcher::with_default(&crate::Dispatch::new(subscriber), f) in with_default()
27 /// Sets this subscriber as the global default for the duration of the entire program.
28 /// Will be used as a fallback if no thread-local subscriber has been set in a thread (using `with_…
37 /// [`Subscriber`]: super::subscriber::Subscriber
39 pub fn set_global_default<S>(subscriber: S) -> Result<(), SetGlobalDefaultError> in set_global_default()
41 S: Subscriber + Send + Sync + 'static, in set_global_default()
43 crate::dispatcher::set_global_default(crate::Dispatch::new(subscriber)) in set_global_default()
46 /// Sets the [`Subscriber`] as the default for the current thread for the
49 /// The default subscriber is used when creating a new [`Span`] or [`Event`].
52 /// [`Subscriber`]: super::subscriber::Subscriber
57 #[must_use = "Dropping the guard unregisters the subscriber."]
58 pub fn set_default<S>(subscriber: S) -> DefaultGuard in set_default()
60 S: Subscriber + Send + Sync + 'static, in set_default()
62 crate::dispatcher::set_default(&crate::Dispatch::new(subscriber)) in set_default()