[−][src]Struct tracing_subscriber::fmt::Layer
A Layer
that logs formatted representations of tracing
events.
Examples
Constructing a default fmt subscriber via the Layer API:
use tracing_subscriber::{fmt, registry::Registry}; use tracing_subscriber::prelude::*; let subscriber = fmt::Layer::default() .with_subscriber(Registry::default()); tracing::subscriber::set_global_default(subscriber).unwrap();
Methods
impl<S> Layer<S>
[src]
pub fn builder() -> LayerBuilder<S>
[src]
Returns a new LayerBuilder
for configuring a Layer
.
Trait Implementations
impl<S: Debug, N: Debug, E: Debug, W: Debug> Debug for Layer<S, N, E, W>
[src]
impl<S> Default for Layer<S> where
S: Subscriber + for<'a> LookupSpan<'a>,
[src]
S: Subscriber + for<'a> LookupSpan<'a>,
impl<S, N, E, W> Layer<S> for Layer<S, N, E, W> where
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'writer> FormatFields<'writer> + 'static,
E: FormatEvent<S, N> + 'static,
W: MakeWriter + 'static,
[src]
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'writer> FormatFields<'writer> + 'static,
E: FormatEvent<S, N> + 'static,
W: MakeWriter + 'static,
fn new_span(&self, attrs: &Attributes, id: &Id, ctx: Context<S>)
[src]
fn on_record(&self, id: &Id, values: &Record, ctx: Context<S>)
[src]
fn on_event(&self, event: &Event, ctx: Context<S>)
[src]
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
[src]
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
[src]
fn enabled(&self, metadata: &Metadata, ctx: Context<S>) -> bool
[src]
fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<S>)
[src]
fn on_enter(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_exit(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_close(&self, _id: Id, _ctx: Context<S>)
[src]
fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<S>)
[src]
fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
L: Layer<S>,
Self: Sized,
[src]
L: Layer<S>,
Self: Sized,
fn with_subscriber(self, inner: S) -> Layered<Self, S> where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl<S, N, E, W> RefUnwindSafe for Layer<S, N, E, W> where
E: RefUnwindSafe,
N: RefUnwindSafe,
S: RefUnwindSafe,
W: RefUnwindSafe,
E: RefUnwindSafe,
N: RefUnwindSafe,
S: RefUnwindSafe,
W: RefUnwindSafe,
impl<S, N, E, W> Send for Layer<S, N, E, W> where
E: Send,
N: Send,
S: Send,
W: Send,
E: Send,
N: Send,
S: Send,
W: Send,
impl<S, N, E, W> Sync for Layer<S, N, E, W> where
E: Sync,
N: Sync,
S: Sync,
W: Sync,
E: Sync,
N: Sync,
S: Sync,
W: Sync,
impl<S, N, E, W> Unpin for Layer<S, N, E, W> where
E: Unpin,
N: Unpin,
S: Unpin,
W: Unpin,
E: Unpin,
N: Unpin,
S: Unpin,
W: Unpin,
impl<S, N, E, W> UnwindSafe for Layer<S, N, E, W> where
E: UnwindSafe,
N: UnwindSafe,
S: UnwindSafe,
W: UnwindSafe,
E: UnwindSafe,
N: UnwindSafe,
S: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,