pub struct Glog<T = UtcTime> { /* private fields */ }
Expand description

A glog-inspired span and event formatter.

Implementations

Use the given timer for span and event time stamps.

tracing-glog provides two timers: LocalTime and UtcTime. UtcTime is the default timer.

Sets whether or not the span context is included. Defaults to true.

By default, formatters building atop of tracing_subscriber::fmt will include the span context as fmt::Layer and fmt::Subscriber assume that span context is is valuable and the raison d’être for using tracing and, as such, do not provide a toggle. However, users migrating from logging systems such as glog or folly’s xlog might find the span context to be overwhelming. Therefore, this formatter-level toggle is availible in order to provide a smoother onboarding experience to tracing.

Notice: This is a relatively coarse toggle. In most circumstances, usage of tracing-subscriber’s filter_fn is preferred to disable spans on a more fine-grained basis.

Trait Implementations

Returns the “default value” for a type. Read more
Write a log message for Event in Context to the given Writer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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