Struct tracing_subscriber::fmt::Subscriber
source · [−]pub struct Subscriber<N = DefaultFields, E = Format<Full>, F = LevelFilter, W = fn() -> Stdout> { /* private fields */ }
Expand description
A Subscriber
that logs formatted representations of tracing
events.
This consists of an inner Formatter
wrapped in a layer that performs filtering.
Implementations
The maximum verbosity level that is enabled by a Subscriber
by
default.
This can be overridden with the SubscriberBuilder::with_max_level
method.
Returns a new SubscriberBuilder
for configuring a format subscriber.
Trait Implementations
impl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
impl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
type Data = <Layered<F, Formatter<N, E, W>> as LookupSpan<'a>>::Data
type Data = <Layered<F, Formatter<N, E, W>> as LookupSpan<'a>>::Data
The type of span data stored in this registry.
Registers a Filter
for per-layer filtering with this
Subscriber
. Read more
impl<N, E, F, W> Subscriber for Subscriber<N, E, F, W> where
N: for<'writer> FormatFields<'writer> + 'static,
E: FormatEvent<Registry, N> + 'static,
F: Layer<Formatter<N, E, W>> + 'static,
W: MakeWriter + 'static,
Layered<F, Formatter<N, E, W>>: Subscriber,
Layer<Registry, N, E, W>: Layer<Registry>,
impl<N, E, F, W> Subscriber for Subscriber<N, E, F, W> where
N: for<'writer> FormatFields<'writer> + 'static,
E: FormatEvent<Registry, N> + 'static,
F: Layer<Formatter<N, E, W>> + 'static,
W: MakeWriter + 'static,
Layered<F, Formatter<N, E, W>>: Subscriber,
Layer<Registry, N, E, W>: Layer<Registry>,
Registers a new callsite with this subscriber, returning whether or not the subscriber is interested in being notified about the callsite. Read more
Adds an indication that span
follows from the span with the id
follows
. Read more
Returns a type representing this subscriber’s view of the current span. Read more
Returns the highest verbosity level that this Subscriber
will
enable, or None
, if the subscriber does not implement level-based
filtering or chooses not to implement this method. Read more
If self
is the same type as the provided TypeId
, returns an untyped
*const
pointer to that type. Otherwise, returns None
. Read more
Auto Trait Implementations
impl<N, E, F, W> RefUnwindSafe for Subscriber<N, E, F, W> where
E: RefUnwindSafe,
F: RefUnwindSafe,
N: RefUnwindSafe,
W: RefUnwindSafe,
impl<N = DefaultFields, E = Format<Full, SystemTime>, F = LevelFilter, W = fn() -> Stdout> !UnwindSafe for Subscriber<N, E, F, W>
Blanket Implementations
Mutably borrows from an owned value. Read more
Sets self
as the default subscriber in the current scope, returning a
guard that will unset it when dropped. Read more
Attempts to set self
as the global default subscriber in the current
scope, returning an error if one is already set. Read more
Attempts to set self
as the global default subscriber in the current
scope, panicking if this fails. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more