Tracing::FmtLayer
Inherits Tracing::Layer < Reference < Object
A Layer that formats spans and events to an IO writer.
Ported from upstream tracing_subscriber::fmt.
Constructors
make_writer
Sourcewith_test_writer
SourceInstance methods
compact
SourceReturns true if this layer would enable the given metadata.
event_format(fmt : FmtFormat::FormatEvent) : self
Sourcejson
Sourceon_new_span(attrs : Core::Span::Attributes, id : Core::Span::Id, ctx : LayerContext) : Nil
Called when a new span is created.
on_record(id : Core::Span::Id, values : Core::Span::Record, ctx : LayerContext) : Nil
Called when fields are recorded on a span.
pretty
Sourcewith_filter(filter : LevelFilter) : self
Sourcewith_make_writer(mw : FmtWriter::MakeWriter) : self
Sourcewith_none_timer
Sourcewith_span_events(events : FmtSpan) : self
Sourcewith_test_writer
Sourcewith_thread_ids(show : Bool) : self
Display the current thread's identifier. In Crystal, threads map to fibers, so this shows the fiber's object id (see Divergences).
with_thread_names(show : Bool) : self
Display the current thread's name. In Crystal, threads map to fibers, so this shows the fiber's name (see Divergences).
with_timer(timer : FmtTime::FormatTime | Nil) : self
Sourcewithout_time
Source