Struct tracing_glog::Glog
source · [−]pub struct Glog<T = UtcTime> { /* private fields */ }Expand description
A glog-inspired span and event formatter.
Implementations
sourceimpl<T> Glog<T>
impl<T> Glog<T>
sourcepub fn with_timer<T2>(self, timer: T2) -> Glog<T2>where
T2: FormatTime,
pub fn with_timer<T2>(self, timer: T2) -> Glog<T2>where
T2: FormatTime,
pub fn with_thread_names(self, with_thread_names: bool) -> Glog<T>
pub fn with_target(self, with_target: bool) -> Glog<T>
sourcepub fn with_span_context(self, with_span_context: bool) -> Glog<T>
pub fn with_span_context(self, with_span_context: bool) -> Glog<T>
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.