[−][src]Struct tracing_fmt::Builder
Configures and constructs Subscriber
s.
Methods
impl<N, E, F, W> Builder<N, E, F, W> where
E: FormatEvent<N> + 'static,
F: Layer<Subscriber<N, E, W>> + 'static,
N: NewVisitor<'a> + 'static,
W: MakeWriter + 'static,
[src]
E: FormatEvent<N> + 'static,
F: Layer<Subscriber<N, E, W>> + 'static,
N: NewVisitor<'a> + 'static,
W: MakeWriter + 'static,
pub fn finish(self) -> Layered<F, Subscriber<N, E, W>, Subscriber<N, E, W>>
[src]
Finish the builder, returning a new FmtSubscriber
.
impl<N, L, T, F, W> Builder<N, Format<L, T>, F, W> where
N: NewVisitor<'a> + 'static,
[src]
N: NewVisitor<'a> + 'static,
pub fn with_timer<T2>(self, timer: T2) -> Builder<N, Format<L, T2>, F, W>
[src]
Use the given timer
for log message timestamps.
pub fn without_time(self) -> Builder<N, Format<L, ()>, F, W>
[src]
Do not emit timestamps with log messages.
pub fn with_ansi(self, ansi: bool) -> Builder<N, Format<L, T>, F, W>
[src]
Enable ANSI encoding for formatted events.
pub fn with_target(self, display_target: bool) -> Builder<N, Format<L, T>, F, W>
[src]
Sets whether or not an event's target is displayed.
impl<N, E, W> Builder<N, E, Filter, W> where
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
[src]
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
pub fn with_filter_reloading(
self
) -> Builder<N, E, Layer<Filter, Subscriber<N, E, W>>, W>
[src]
self
) -> Builder<N, E, Layer<Filter, Subscriber<N, E, W>>, W>
Configures the subscriber being built to allow filter reloading at runtime.
impl<N, E, W> Builder<N, E, Layer<Filter, Subscriber<N, E, W>>, W> where
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
[src]
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
pub fn reload_handle(&self) -> Handle<Filter, Subscriber<N, E, W>>
[src]
Returns a Handle
that may be used to reload the constructed subscriber's
filter.
impl<N, E, F, W> Builder<N, E, F, W>
[src]
pub fn with_visitor<N2>(self, new_visitor: N2) -> Builder<N2, E, F, W> where
N2: NewVisitor<'a> + 'static,
[src]
N2: NewVisitor<'a> + 'static,
Sets the Visitor that the subscriber being built will use to record fields.
pub fn with_filter<impl Into>(
self,
filter: impl Into
) -> Builder<N, E, Filter, W> where
impl Into: Into<Filter>,
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
[src]
self,
filter: impl Into
) -> Builder<N, E, Filter, W> where
impl Into
Subscriber<N, E, W>: Subscriber,
Subscriber<N, E, W>: 'static,
Sets the filter that the subscriber being built will use to determine if a span or event is enabled.
pub fn compact(self) -> Builder<N, Format<Compact, SystemTime>, F, W> where
N: NewVisitor<'a> + 'static,
[src]
N: NewVisitor<'a> + 'static,
Sets the subscriber being built to use a less verbose formatter.
See format::Compact
.
pub fn on_event<E2>(self, fmt_event: E2) -> Builder<N, E2, F, W> where
E2: FormatEvent<N> + 'static,
[src]
E2: FormatEvent<N> + 'static,
Sets the function that the subscriber being built should use to format events that occur.
pub fn inherit_fields(self, inherit_fields: bool) -> Builder<N, E, F, W>
[src]
Sets whether or not spans inherit their parents' field values (disabled by default).
impl<N, E, F, W> Builder<N, E, F, W>
[src]
pub fn with_writer<W2>(self, make_writer: W2) -> Builder<N, E, F, W2> where
W2: MakeWriter + 'static,
[src]
W2: MakeWriter + 'static,
Sets the MakeWriter
that the subscriber being built will use to write events.
Examples
Using stderr
rather than stdout
:
use std::io; let subscriber = tracing_subscriber::fmt::Subscriber::builder() .with_writer(io::stderr) .finish();
Trait Implementations
impl<N, E, F, W> Debug for Builder<N, E, F, W> where
E: Debug,
F: Debug,
N: Debug,
W: Debug,
[src]
E: Debug,
F: Debug,
N: Debug,
W: Debug,
impl Default for Builder<NewRecorder, Format<Full, SystemTime>, Identity, fn() -> Stdout>
[src]
fn default(
) -> Builder<NewRecorder, Format<Full, SystemTime>, Identity, fn() -> Stdout>
[src]
) -> Builder<NewRecorder, Format<Full, SystemTime>, Identity, fn() -> Stdout>
impl<N, E, F, W> Default for Builder<N, E, F, W> where
E: Default,
F: Default,
N: Default,
W: Default,
[src]
E: Default,
F: Default,
N: Default,
W: Default,
Auto Trait Implementations
impl<N, E, F, W> Send for Builder<N, E, F, W> where
E: Send,
F: Send,
N: Send,
W: Send,
E: Send,
F: Send,
N: Send,
W: Send,
impl<N, E, F, W> Unpin for Builder<N, E, F, W> where
E: Unpin,
F: Unpin,
N: Unpin,
W: Unpin,
E: Unpin,
F: Unpin,
N: Unpin,
W: Unpin,
impl<N, E, F, W> Sync for Builder<N, E, F, W> where
E: Sync,
F: Sync,
N: Sync,
W: Sync,
E: Sync,
F: Sync,
N: Sync,
W: Sync,
impl<N, E, F, W> UnwindSafe for Builder<N, E, F, W> where
E: UnwindSafe,
F: UnwindSafe,
N: UnwindSafe,
W: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
N: UnwindSafe,
W: UnwindSafe,
impl<N, E, F, W> RefUnwindSafe for Builder<N, E, F, W> where
E: RefUnwindSafe,
F: RefUnwindSafe,
N: RefUnwindSafe,
W: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
N: RefUnwindSafe,
W: RefUnwindSafe,
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,