[][src]Struct tracing_subscriber::fmt::format::Format

pub struct Format<F = Full, T = SystemTime> { /* fields omitted */ }

A pre-configured event formatter.

You will usually want to use this as the FormatEvent for a FmtSubscriber.

The default logging format, Full includes all fields in each event and its containing spans. The Compact logging format includes only the fields from the most-recently-entered span.

Methods

impl<F, T> Format<F, T>[src]

pub fn compact(self) -> Format<Compact, T>[src]

Use a less verbose output format.

See Compact.

pub fn with_timer<T2>(self, timer: T2) -> Format<F, T2>[src]

Use the given timer for log message timestamps.

See time for the provided timer implementations.

Note that using the chrono feature flag enables the additional time formatters ChronoUtc and ChronoLocal.

pub fn without_time(self) -> Format<F, ()>[src]

Do not emit timestamps with log messages.

pub fn with_ansi(self, ansi: bool) -> Format<F, T>[src]

Enable ANSI terminal colors for formatted output.

pub fn with_target(self, display_target: bool) -> Format<F, T>[src]

Sets whether or not an event's target is displayed.

Trait Implementations

impl<N, T> FormatEvent<N> for Format<Full, T> where
    N: for<'a> NewVisitor<'a>,
    T: FormatTime
[src]

impl<N, T> FormatEvent<N> for Format<Compact, T> where
    N: for<'a> NewVisitor<'a>,
    T: FormatTime
[src]

impl<F: Clone, T: Clone> Clone for Format<F, T>[src]

impl Default for Format<Full, SystemTime>[src]

impl<F: Debug, T: Debug> Debug for Format<F, T>[src]

Auto Trait Implementations

impl<F, T> Send for Format<F, T> where
    F: Send,
    T: Send

impl<F, T> Sync for Format<F, T> where
    F: Sync,
    T: Sync

impl<F, T> Unpin for Format<F, T> where
    F: Unpin,
    T: Unpin

impl<F, T> UnwindSafe for Format<F, T> where
    F: UnwindSafe,
    T: UnwindSafe

impl<F, T> RefUnwindSafe for Format<F, T> where
    F: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]