This is a breaking release of tracing-subscriber
. The primary breaking
change in this release is the removal of the dependency on the chrono
crate, due to RUSTSEC-2020-0159. To replace chrono
, support is
added for formatting timestamps using the time
crate instead.
In addition, this release includes a number of other breaking API
changes, such as adding (limited) support for #![no_std]
targets,
removing previously deprecated APIs, and more.
Breaking Changes
- Removed APIs deprecated in the v0.2.x release series.
- Renamed
Layer::new_span
toLayer::on_new_span
(#1674) - Removed
Layer
impl forArc<L: Layer<S>>
andArc<dyn Layer<S> + ...>
(#1649) - Replaced the
chrono
crate with thetime
crate for timestamp
formatting, to resolve RUSTSEC-2020-0159 (#1646) - Removed
json
andenv-filter
from default features. They must now
be enabled explicitly (#1647). This means thatRUST_LOG
-based filters will not
work unless theenv-filter
feature is enabled. - Changed
FormatEvent::format_event
andFormatFields::format_fields
trait methods to take aWriter
type, rather than a&mut dyn fmt::Write
trait object (#1661) - Changed the signature of the
MakeWriter
trait by adding a lifetime
parameter (#781)
Changed
- layer: Renamed
Layer::new_span
toLayer::on_new_span
(#1674) - fmt: Changed
FormatEvent::format_event
and
FormatFields::format_fields
trait methods to take aWriter
type,
rather than a&mut dyn fmt::Write
trait object (#1661) - json, env-filter:
json
andenv-filter
feature flags are no
longer enabled by default (#1647)
Removed
-
Removed deprecated
CurrentSpan
type (#1320) -
registry: Removed deprecated
SpanRef::parents
iterator, replaced
bySpanRef::scope
in [#1431] ([#1648)]) -
layer: Removed deprecated
Context::scope
iterator, replaced by
Context::span_scope
andContext::event_scope
in #1431 and
#1434 (#1648) -
layer: Removed
Layer
impl forArc<L: Layer<S>>
andArc<dyn Layer<S> + ...>
. These interfere with per-layer filtering. (#1649) -
fmt: Removed deprecated
LayerBuilder
type (#1673) -
fmt: Removed
fmt::Layer::on_event
(renamed to
fmt::Layer::fmt_event
) (#1673) -
fmt, chrono: Removed the
chrono
feature flag and APIs for
using thechrono
crate for timestamp formatting (#1646)Added
-
fmt, time:
LocalTime
andUtcTime
types for formatting
timestamps using thetime
crate (#1646) -
fmt: Added a lifetime parameter to the
MakeWriter
trait,
allowing it to return a borrowed writer. This enables implementations
ofMakeWriter
for types such asMutex<T: io::Write>
and
std::fs::File
. (#781) -
env-filter: Documentation improvements (#1637)
-
Support for some APIs on
#![no_std]
targets, by disabling thestd
feature flag (#1660)
Thanks to @Folyd and @nmathewson for contributing to this release!