51 KiB
0.3.20 (August 29, 2025)
[ [crates.io][crate-0.3.20] ] | [ [docs.rs][docs-0.3.20] ]
Fixed
- Escape ANSI escape sequences in logs
0.3.19 (November 29, 2024)
This release updates the tracing dependency to v0.1.41 and
the tracing-serde dependency to v0.2.0.
Added
- Add
set_span_eventstofmt::Subscriber(#2962) - tracing: Allow
&[u8]to be recorded as event/span field (#2954)
Changed
- Set
logmax level when reloading (#1270) - Bump MSRV to 1.63 (#2793)
- Use const
thread_locals when possible (#2838) - Don't gate
with_ansi()on the "ansi" feature (#3020) - Updated tracing-serde to 0.2.0 (#3160)
0.3.18 (November 13, 2023)
This release of tracing-subscriber adds support for the NO_COLOR environment
variable (an informal standard to disable emitting ANSI color escape codes) in
fmt::Layer, reintroduces support for the chrono crate, and increases the
minimum supported Rust version (MSRV) to Rust 1.63.0.
It also introduces several minor API improvements.
Added
- chrono: Add
chronoimplementations ofFormatTime(#2690) - subscriber: Add support for the
NO_COLORenvironment variable infmt::Layer(#2647) - fmt: make
format::Writer::new()public (#2680) - filter: Implement
layer::FilterforOption<Filter>(#2407)
Changed
- log: bump version of
tracing-logto 0.2 (#2772) - Increased minimum supported Rust version (MSRV) to 1.63.0+.
Thanks to @shayne-fletcher, @dmlary, @kaifastromai, and @jsgf for contributing!
0.3.17 (April 21, 2023)
This release of tracing-subscriber fixes a build error when using env-filter
with recent versions of the regex crate. It also introduces several minor API
improvements.
Fixed
- env-filter: Add "unicode-case" and "unicode-perl" to the
regexdependency, fixing a build error with recent versions ofregex(#2566) - A number of minor documentation typos and other fixes (#2384, #2378, #2368, #2548)
Added
- filter: Add
fmt::Displayimpl forfilter::Targets(#2343) - fmt: Made
with_ansi(false)no longer require the "ansi" feature, so that ANSI formatting escapes can be disabled without requiring ANSI-specific dependencies (#2532)
Changed
- fmt: Dim targets in the
Compactformatter, matching the default formatter (#2409)
Thanks to @keepsimple1, @andrewhalle, @LeoniePhiline, @LukeMathWalker, @howardjohn, @daxpedda, and @dbidwell94 for contributing to this release!
0.3.16 (October 6, 2022)
This release of tracing-subscriber fixes a regression introduced in
v0.3.15 where Option::None's Layer implementation would
set the max level hint to OFF. In addition, it adds several new APIs,
including the Filter::event_enabled method for filtering events based on
fields values, and the ability to log internal errors that occur when writing a
log line.
This release also replaces the dependency on the unmaintained [ansi-term]
crate with the [nu-ansi-term] crate, resolving an informational security
advisory (RUSTSEC-2021-0139) for [ansi-term]'s maintainance status. This
increases the minimum supported Rust version (MSRV) to Rust 1.50+, although the
crate should still compile for the previous MSRV of Rust 1.49+ when the ansi
feature is not enabled.
Fixed
- layer:
Option::None'sLayerimpl always setting themax_level_hinttoLevelFilter::OFF(#2321) - Compilation with
-Z minimal versions(#2246) - env-filter: Clarify that disabled level warnings are emitted by
tracing-subscriber(#2285)
Added
- fmt: Log internal errors to
stderrif writing a log line fails (#2102) - fmt:
FmtLayer::log_internal_errorsandFmtSubscriber::log_internal_errorsmethods for configuring whether internal writer errors are printed tostderr(#2102) - fmt:
#[must_use]attributes on builders to warn if aSubscriberis configured but not set as the default subscriber (#2239) - filter:
Filter::event_enabledmethod for filtering an event based on its fields (#2245, #2251) - filter:
Targets::default_levelaccessor ([#2242])
Changed
- ansi: Replaced dependency on unmaintained
ansi-termcrate withnu-ansi-term((#2287, fixes informational advisory RUSTSEC-2021-0139) tracing-core: updated to 0.1.30- Minimum Supported Rust Version (MSRV) increased to Rust 1.50+ (when the
ansi) feature flag is enabled (#2287)
Documented
- fmt: Correct inaccuracies in
fmt::initdocumentation (#2224) - filter: Fix incorrect doc link in
filter::Notcombinator (#2249)
Thanks to new contributors @cgbur, @DesmondWillowbrook, @RalfJung, and @poliorcetics, as well as returning contributors @CAD97, @connec, @jswrenn, @guswynn, and @bryangarza, for contributing to this release!
0.3.15 (Jul 20, 2022)
This release fixes a bug where the reload layer would fail to pass through
max_level_hint to the underlying layer, potentially breaking filtering.
Fixed
- reload: pass through
max_level_hintto the innerLayer(#2204)
Thanks to @guswynn for contributing to this release!
0.3.14 (Jul 1, 2022)
This release fixes multiple filtering bugs in the Layer implementations for
Option<impl Layer> and Vec<impl Layer>.
Fixed
- layer:
Layer::event_enabledimplementation forOption<impl Layer<S>>returningfalsewhen theOptionisNone, disabling all events globally (#2193) - layer:
Layer::max_level_hintimplementation forOption<impl Layer<S>>incorrectly disabling max level filtering when the option isNone(#2195) - layer:
Layer::max_level_hintimplementation forVec<impl Layer<S>>returningLevelFilter::ERRORrather thanLevelFilter::OFFwhen theVecis empty (#2195)
Thanks to @CAD97 and @guswynn for contributing to this release!
0.3.13 (Jun 30, 2022) (YANKED)
This release of tracing-subscriber fixes a compilation failure due to an
incorrect tracing-core dependency that was introduced in v0.3.12.
Changed
- tracing_core: Updated minimum dependency version to 0.1.28 (#2190)
0.3.12 (Jun 29, 2022) (YANKED)
This release of tracing-subscriber adds a new Layer::event_enabled method,
which allows Layers to filter events after their field values are recorded;
a Filter implementation for reload::Layer, to make using reload with
per-layer filtering more ergonomic, and additional inherent method downcasting
APIs for the Layered type. In addition, it includes dependency updates, and
minor fixes for documentation and feature flagging.
Added
- layer:
Layer::event_enabledmethod, which can be implemented to filter events based on their field values (#2008) - reload:
Filterimplementation forreload::Layer(#2159) - layer:
Layered::downcast_refandLayered::isinherent methods (#2160)
Changed
- parking_lot: Updated dependency on
parking_lotto 0.13.0 (#2143) - Replaced
lazy_staticdependency withonce_cell([#2147])
Fixed
- Don't enable
tracing-corefeatures by default (#2107) - Several documentation link and typo fixes (#2064, #2068, #[2077], #2161, #1088)
Thanks to @ben0x539, @jamesmunns, @georgemp, @james7132, @jswrenn, @CAD97, and @guswynn for contributing to this release!
0.3.11 (Apr 9, 2022)
This is a bugfix release for the Filter implementation for EnvFilter added
in v0.3.10.
Fixed
- env-filter: Added missing
Filter::on_recordcallback toEnvFilter'sFilterimpl (#2058) - env-filter: Fixed method resolution issues when calling
EnvFiltermethods with both theFilterandLayertraits in scope (#2057) - env-filter: Fixed
EnvFilter::builder().parse()and other parsing methods returning an error when parsing an empty string (#2052)
Thanks to new contributor @Ma124 for contributing to this release!
0.3.10 (Apr 1, 2022)
This release adds several new features, including a Filter implementation and
new builder API for EnvFilter, support for using a Vec<L> where L: Layer as
a Layer, and a number of smaller API improvements to make working with dynamic
and reloadable layers easier.
Added
- registry: Implement
FilterforEnvFilter, allowing it to be used with per-layer filtering (#1983) - registry:
Filter::on_new_span,Filter::on_enter,Filter::on_exit,Filter::on_closeandFilter::on_recordcallbacks to allowFilters to track span states internally (#1973, #2017, #2031) - registry:
Filtered::filterandFiltered::filter_mutaccessors (#1959) - registry:
Filtered::innerandFiltered::inner_mutaccessors to borrow the wrappedLayer(#2034) - layer: Implement
LayerforVec<L: Layer>, to allow composing together a dynamically sized list ofLayers (#2027) - layer:
Layer::boxedmethod to make type-erasingLayers easier (#2026) - fmt:
fmt::Layer::writerandfmt::Layer::writer_mutaccessors (#2034) - fmt:
fmt::Layer::set_ansimethod to allow changing the ANSI formatting configuration at runtime (#2034) - env-filter:
EnvFilter::builderto configure a newEnvFilterprior to parsing it (#2035) - Several documentation fixes and improvements (#1972, #1971, #2023, #2023)
Fixed
- fmt:
fmt::Layer's auto traits no longer depend on theSubscribertype parameter's auto traits (#2025) - env-filter: Fixed missing help text when the
ansifeature is disabled (#2029)
Thanks to new contributors @TimoFreiberg and @wagenet, as well as @CAD97 for contributing to this release!
0.3.9 (Feb 17, 2022)
This release updates the minimum supported Rust version (MSRV) to 1.49.0, and
updates the (optional) dependency on parking_lot to v0.12.
Changed
- Updated minimum supported Rust version (MSRV) to 1.49.0 (#1913)
parking_lot: updated to v0.12 (008339d)
Added
0.3.8 (Feb 4, 2022)
This release adds experimental support for recording structured field
values using the valuable crate to the format::Json formatter. In
particular, user-defined types which are recorded using their
valuable::Valuable implementations will be serialized as JSON objects,
rather than using their fmt::Debug representation. See this blog post
for details on valuable.
Note that valuable support currently requires --cfg tracing_unstable. See
the documentation for details.
Additionally, this release includes a number of other smaller API improvements.
Added
- json: Experimental support for recording
valuablevalues as structured JSON (#1862, #1901) - filter:
Targets::would_enablemethod for testing if aTargetsfilter would enable a given target (#1903) - fmt:
map_event_format,map_fmt_fields, andmap_writermethods tofmt::Layerandfmt::SubscriberBuilder(#1871)
Changed
tracing-core: updated to 0.1.22
Fixed
- Set
smallvecminimal version to 1.2.0, to fix compilation errors with-Z minimal-versions(#1890) - Minor documentation fixes (#1902, #1893)
Thanks to @guswynn, @glts, and @lilyball for contributing to this release!
0.3.7 (Jan 25, 2022)
This release adds combinators for combining filters.
Additionally, this release also updates the thread-local crate to v1.1.4,
fixing warnings for the security advisory RUSTSEC-2022-0006. Note that
previous versions of tracing-subscriber did not use any of the thread-local
crate's APIs effected by the vulnerability. However, updating the version fixes
warnings emitted by cargo audit and similar tools.
Added
- filter: Added combinators for combining filters (#1578)
Fixed
- registry: Updated
thread-localto v1.1.4 (#1858)
Thanks to new contributor @matze for contributing to this release!
0.3.6 (Jan 14, 2022)
This release adds configuration options to tracing_subscriber::fmt to log
source code locations for events.
Added
- fmt: Added
with_fileandwith_line_numberconfiguration methods tofmt::Format,fmt::SubscriberBuilder, andfmt::Layer(#1773)
Fixed
- fmt: Removed incorrect leading comma from span fields with the
Prettyformatter (#1833)
Deprecated
- fmt: Deprecated
Pretty::with_source_location, as it can now be replaced by the more generalFormat,SubscriberBuilder, andLayermethods (#1773)
Thanks to new contributor @renecouto for contributing to this release!
0.3.5 (Dec 29, 2021)
This release re-enables RUST_LOG filtering in tracing_subscriber::fmt's
default initialization methods, and adds an OffsetLocalTime formatter for
using local timestamps with the time crate.
Added
- fmt: Added
OffsetLocalTimeformatter tofmt::timefor formatting local timestamps with a fixed offset (#1772)
Fixed
- fmt: Added a
Targetsfilter tofmt::init()andfmt::try_init()when the "env-filter" feature is disabled, so thatRUST_LOGis still honored (#1781)
Thanks to @marienz and @ishitatsuyuki for contributing to this release!
0.3.4 (Dec 23, 2021)
This release contains bugfixes for the fmt module, as well as documentation
improvements.
Fixed
- fmt: Fixed
fmtnot emitting log lines when timestamp formatting fails (#1689) - fmt: Fixed double space before thread IDs with
Prettyformatter (#1778) - Several documentation improvements (#1608, #1699, #1701)
Thanks to new contributors @Swatinem and @rukai for contributing to this release!
0.3.3 (Nov 29, 2021)
This release fixes a pair of regressions in tracing-subscriber's fmt module.
Fixed
- fmt: Fixed missing event fields with
Compactformatter (#1755) - fmt: Fixed
PrettyFieldsformatter (and thusformat::Prettyevent formatter) ignoring thefmt::Layer's ANSI color code configuration (#1747)
0.3.2 (Nov 19, 2021)
Fixed
- fmt: Fixed
MakeWriterfiltering not working withBoxMakeWriter(#1694)
Added
- fmt:
Writer::has_ansi_escapesmethod to check if an output supports ANSI terminal formatting escape codes (#1696) - fmt: Added additional ANSI terminal formatting to field formatters when supported (#1702)
- fmt: Added
FmtContext::span_scope,FmtContext::event_scope, andFmtContext::parent_spanmethods for accessing the current span and its scope when formatting an event (#1728) - fmt: Improved documentation on implementing event formatters (#1727)
0.3.1 (Oct 25, 2021)
This release fixes a few issues related to feature flagging.
Fixed
- time: Compilation error when enabling the "time" feature flag without also enabling the "local-time" feature flag (#1685)
- registry: Unused method warnings when the "std" feature is enabled but the "registry" feature is disabled (#1686)
0.3.0 (Oct 22, 2021)
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_spantoLayer::on_new_span(#1674) - Removed
Layerimpl forArc<L: Layer<S>>andArc<dyn Layer<S> + ...>(#1649) - Replaced the
chronocrate with thetimecrate for timestamp formatting, to resolve RUSTSEC-2020-0159 (#1646) - Removed
jsonandenv-filterfrom default features. They must now be enabled explictly (#1647). This means thatRUST_LOG-based filters will not work unless theenv-filterfeature is enabled. - Changed
FormatEvent::format_eventandFormatFields::format_fieldstrait methods to take aWritertype, rather than a&mut dyn fmt::Writetrait object (#1661) - Changed the signature of the
MakeWritertrait by adding a lifetime parameter (#781)
Changed
- layer: Renamed
Layer::new_spantoLayer::on_new_span(#1674) - fmt: Changed
FormatEvent::format_eventandFormatFields::format_fieldstrait methods to take aWritertype, rather than a&mut dyn fmt::Writetrait object (#1661) - json, env-filter:
jsonandenv-filterfeature flags are no longer enabled by default (#1647)
Removed
- Removed deprecated
CurrentSpantype (#1320) - registry: Removed deprecated
SpanRef::parentsiterator, replaced bySpanRef::scopein #1431 ([#1648)]) - layer: Removed deprecated
Context::scopeiterator, replaced byContext::span_scopeandContext::event_scopein #1431 and #1434 ([#1648)]) - layer: Removed
Layerimpl forArc<L: Layer<S>>andArc<dyn Layer<S> + ...>. These interfere with per-layer filtering. (#1649) - fmt: Removed deprecated
LayerBuildertype (#1673) - fmt: Removed
fmt::Layer::on_event(renamed tofmt::Layer::fmt_event) (#1673) - fmt, chrono: Removed the
chronofeature flag and APIs for using thechronocrate for timestamp formatting (#1646)
Added
- fmt, time:
LocalTimeandUtcTimetypes for formatting timestamps using thetimecrate (#1646) - fmt: Added a lifetime parameter to the
MakeWritertrait, allowing it to return a borrowed writer. This enables implementations ofMakeWriterfor types such asMutex<T: io::Write>andstd::fs::File. (#781) - env-filter: Documentation improvements ([#1637])
- Support for some APIs on
#![no_std]targets, by disabling thestdfeature flag (#1660)
Thanks to @Folyd and @nmathewson for contributing to this release!
0.2.25 (October 5, 2021)
This release fixes an issue where a Layer implementation's custom
downcast_raw implementation was lost when wrapping that layer with a per-layer
filter.
Fixed
- registry: Forward
Filtered::downcast_rawto wrappedLayer(#1619)
Added
Thanks to @bryanburgers for contributing to this release!
0.2.24 (September 19, 2021)
This release contains a number of bug fixes, including a fix for
tracing-subscriber failing to compile on the minimum supported Rust version of
1.42.0. It also adds IntoIterator implementations for the Targets type.
Fixed
- Fixed compilation on Rust 1.42.0 (#1580, #1581)
- registry: Ensure per-layer filter
enabledstate is cleared when a global filter short-circuits filter evaluation (#1575) - layer: Fixed
Layer::on_layernot being called forBoxedLayers, which broke per-layer filtering (#1576)
Added
- filter: Added
Targets::iter, returning an iterator over the set of target-level pairs enabled by aTargetsfilter (#1574) - filter: Added
IntoIteratorimplementations forTargetsand&Targets(#1574)
Thanks to new contributor @connec for contributing to this release!
0.2.23 (September 16, 2021)
This release fixes a few bugs in the per-layer filtering API added in v0.2.21.
Fixed
- env-filter: Fixed excessive
EnvFiltermemory use (#1568) - filter: Fixed a panic that may occur in debug mode when using per-layer filters together with global filters (#1569)
- Fixed incorrect documentation formatting (#1572)
0.2.22 (September 13, 2021)
This fixes a regression where the filter::ParseError type was accidentally
renamed.
Fixed
- filter: Fix
filter::ParseErroraccidentally being renamed tofilter::DirectiveParseError(#1558)
0.2.21 (September 12, 2021)
This release introduces the Filter trait, a new API for per-layer
filtering. This allows controlling which spans and events are recorded by
various layers individually, rather than globally.
In addition, it adds a new Targets filter, which provides a lighter-weight
version of the filtering provided by EnvFilter, as well as other smaller API
improvements and fixes.
Deprecated
- registry:
SpanRef::parent_id, which cannot properly support per-layer filtering. Use.parent().map(SpanRef::id)instead. (#1523)
Fixed
- layer
Contextmethods that are provided when theSubscriberimplementsLookupSpanno longer require the "registry" feature flag (#1525) - layer
fmt::Debugimplementation forLayeredno longer requires theStype parameter to implementDebug(#1528)
Added
- registry:
Filtertrait,Filteredtype,Layer::with_filtermethod, and other APIs for per-layer filtering (#1523) - filter:
FilterFnandDynFilterFntypes that implement global (Layer) and per-layer (Filter) filtering for closures and function pointers (#1523) - filter:
Targetsfilter, which implements a lighter-weight form ofEnvFilter-like filtering (#1550) - env-filter: Added support for filtering on floating-point values (#1507)
- layer:
Layer::on_layercallback, called when layering theLayeronto aSubscriber(#1523) - layer:
Layerimplementations forBox<L>andArc<L>whereL: Layer([#1536]) - layer:
Layerimplementations forBox<dyn Layer<S> + Send + Sync + 'static>andArc<dyn Layer<S> + Send + Sync + 'static>([#1536]) - A number of small documentation fixes and improvements (#1553, #1544, #1539, #1524)
Special thanks to new contributors @jsgf and @maxburke for contributing to this release!
0.2.20 (August 17, 2021)
Fixed
- fmt: Fixed
fmtprinting only the firstsourcefor errors with a chain of sources (#1460) - fmt: Fixed missing space between level and event in the
Prettyformatter (#1498) - json: Fixed
Jsonformatter not honoringwithout_timeandwith_levelconfigurations (#1463)
Added
- registry: Improved panic message when cloning a span whose ID doesn't exist, to aid in debugging issues with multiple subscribers (#1483)
- registry: Improved documentation on span ID generation (#1453)
Thanks to new contributors @joshtriplett and @lerouxrgd, and returning contributor @teozkr, for contributing to this release!
0.2.19 (June 25, 2021)
Deprecated
- registry:
SpanRef::parents,SpanRef::from_root, andContext::scopeiterators, which are replaced by newSpanRef::scopeandScope::from_rootiterators (#1413)
Added
- registry:
SpanRef::scopemethod, which returns a leaf-to-rootIteratorincluding the leaf span (#1413) - registry:
Scope::from_rootmethod, which reverses thescopeiterator to iterate root-to-leaf (#1413) - registry:
Context::event_spanmethod, which looks up the parent span of an event (#1434) - registry:
Context::event_scopemethod, returning aScopeiterator over the span scope of an event (#1434) - fmt:
MakeWriter::make_writer_formethod, which allows returning a different writer based on a span or event's metadata (#1141) - fmt:
MakeWriterExttrait, withwith_max_level,with_min_level,with_filter,and, andor_elsecombinators (#1274) - fmt:
MakeWriterimplementation forArc<W> where &W: io::Write(#1274)
Thanks to @teozkr and @Folyd for contributing to this release!
0.2.18 (April 30, 2021)
Deprecated
- Deprecated the
CurrentSpantype, which is inefficient and largely superseded by theregistryAPI (#1321)
Fixed
- json: Invalid JSON emitted for events in spans with no fields (#1333)
- json: Missing span data for synthesized new span, exit, and close events (#1334)
- fmt: Extra space before log lines when timestamps are disabled (#1355)
Added
- env-filter: Support for filters on spans whose names contain any
characters other than
{and](#1368)
Thanks to @Folyd, and new contributors @akinnane and @aym-v for contributing to this release!
0.2.17 (March 12, 2021)
Fixed
- fmt:
Prettyformatter now honorswith_ansi(false)to disable ANSI terminal formatting (#1240) - fmt: Fixed extra padding when using
Prettyformatter (#1275) - chrono: Removed extra trailing space with
ChronoLocaltime formatter (#1103)
Added
- fmt: Added
FmtContext::current_span()method, returning the current span (#1290) - fmt:
FmtSpanvariants may now be combined using the|operator for more granular control over what span events are generated (#1277)
Thanks to new contributors @cratelyn, @dignati, and @zicklag, as well as @Folyd, @matklad, and @najamelan, for contributing to this release!
0.2.16 (February 19, 2021)
Fixed
- env-filter: Fixed directives where the level is in mixed case (such as
Info) failing to parse (#1126) - fmt: Fixed
fmt::Subscribernot providing a max-level hint (#1251) tracing-subscriberno longer enablestracingandtracing-core's default features (#1144)
Changed
- chrono: Updated
chronodependency to 0.4.16 (#1189) - log: Updated
tracing-logdependency to 0.1.2
Thanks to @salewski, @taiki-e, @davidpdrsn and @markdingram for contributing to this release!
0.2.15 (November 2, 2020)
Fixed
- fmt: Fixed wrong lifetime parameters on
FormatFieldsimpl forFmtContext(#1082)
Added
- fmt:
format::Pretty, an aesthetically pleasing, human-readable event formatter for local development and user-facing CLIs (#1080) - fmt:
FmtContext::field_format, which returns the subscriber's field formatter (#1082)
0.2.14 (October 22, 2020)
Fixed
- registry: Fixed
Registry::newallocating an excessively large amount of memory, most of which would never be used (#1064)
Changed
- registry: Improved
new_spanperformance by reusingHashMapallocations forExtensions(#1064) - registry: Significantly improved the performance of
Registry::enterandRegistry::exit(#1058)
0.2.13 (October 7, 2020)
Changed
- Updated
tracing-coreto 0.1.17 (#992)
Added
- env-filter: Added support for filtering on targets which contain dashes (#1014)
- env-filter: Added a warning when creating an
EnvFilterthat contains directives that would enable a level disabled by thetracingcrate'sstatic_max_levelfeatures (#1021)
Thanks to @jyn514 and @bkchr for contributing to this release!
0.2.12 (September 11, 2020)
Fixed
- env-filter: Fixed a regression where
Option<Level>lost itsInto<LevelFilter>impl (#966) - env-filter: Fixed
EnvFilterenabling spans that should not be enabled when multiple subscribers are in use (#927)
Changed
- json:
format::Jsonnow outputs fields in a more readable order (#892) - Updated
tracing-coredependency to 0.1.16
Added
- fmt: Add
BoxMakeWriterfor erasing the type of aMakeWriterimplementation (#958) - fmt: Add
TestWriterMakeWriterimplementation to support libtest output capturing (#938) - layer: Add
Layerimpl forOption<T> where T: Layer(#910) - env-filter: Add
From<Level>impl forDirective(#918) - Multiple documentation fixes and improvements
Thanks to @Pothulapati, @samrg472, @bryanburgers, @keetonian, and @SriRamanujam for contributing to this release!
0.2.11 (August 10, 2020)
Fixed
- env-filter: Incorrect max level hint when filters involving span field values are in use (#907)
- registry: Fixed inconsistent span stacks when multiple registries are in use on the same thread (#901)
Changed
- env-filter:
regexdependency enables fewer unused feature flags (#899)
Thanks to @bdonlan and @jeromegn for contributing to this release!
0.2.10 (July 31, 2020)
Fixed
- docs: Incorrect formatting (#862)
Changed
- filter:
LevelFilteris now a re-export of thetracing_core::LevelFiltertype, it can now be used interchangeably with the versions intracingandtracing-core(#853) - filter: Significant performance improvements when comparing
LevelFilters andLevels (#853) - Updated the minimum
tracing-coredependency to 0.1.12 (#853)
Added
- filter:
LevelFilterandEnvFilternow participate intracing-core's max level hinting, improving performance significantly in some use cases where levels are disabled globally (#853)
0.2.9 (July 23, 2020)
Fixed
- fmt: Fixed compilation failure on MSRV when the
chronofeature is disabled (#844)
Added
- fmt: Span lookup methods defined by
layer::Contextare now also provided byFmtContext(#834)
0.2.8 (July 17, 2020)
Changed
- fmt: When the
chronodependency is enabled, theSystemTimetimestamp formatter now emits human-readable timestamps rather than usingSystemTime'sfmt::Debugimplementation (chronois still required for customized timestamp formatting) (#807) - ansi: Updated
ansi_termdependency to 0.12 (#816)
Added
- json:
with_span_listmethod to configure the JSON formatter to include a list of all spans in the current trace in formatting events (similarly to the text formatter) (#741) - json:
with_current_spanmethod to configure the JSON formatter to include a field for the current span (the leaf of the trace) in formatted events (#741) - fmt:
with_thread_namesandwith_thread_idsmethods to configurefmt::Subscribers andfmt::Layers to include the thread name and/or thread ID of the current thread when formatting events (#818)
Thanks to new contributors @mockersf, @keetonian, and @Pothulapati for contributing to this release!
0.2.7 (July 1, 2020)
Changed
- parking_lot: Updated the optional
parking_lotdependency to accept the latestparking_lotversion (#774)
Fixed
- fmt: Fixed events with explicitly overridden parent spans being formatted as though they were children of the current span (#767)
Added
- fmt: Added the option to print synthesized events when spans are created, entered, exited, and closed, including span durations (#761)
- Documentation clarification and improvement (#762, #769)
Thanks to @rkuhn, @greenwoodcm, and @Ralith for contributing to this release!
0.2.6 (June 19, 2020)
Fixed
- fmt: Fixed an issue in the JSON formatter where using
Span::recordwould result in malformed spans (#709)
0.2.5 (April 21, 2020)
Changed
- fmt: Bump sharded-slab dependency (#679)
Fixed
- fmt: remove trailing space in
ChronoUtcformat_time(#677)
0.2.4 (April 6, 2020)
This release includes several API ergonomics improvements, including shorthand
constructors for many types, and an extension trait for initializing subscribers
using method-chaining style. Additionally, several bugs in less commonly used
fmt APIs were fixed.
Added
- fmt: Shorthand free functions for constructing most types in
fmt(includingtracing_subscriber::fmt()to return aSubscriberBuilder,tracing_subscriber::fmt::layer()to return a formatLayer, etc) (#660) - registry: Shorthand free function
tracing_subscriber::registry()to construct a new registry (#660) - Added
SubscriberInitExtextension trait for more ergonomic subscriber initialization (#660)
Changed
- fmt: Moved
LayerBuildermethods toLayer(#655)
Deprecated
- fmt:
LayerBuilder, asLayernow implements all builder methods (#655)
Fixed
- fmt: Fixed
Compactformatter not omitting levels withwith_level(false)(#657) - fmt: Fixed
fmt::Layerduplicating the fields for a new span if another layer has already formatted its fields (#634) - fmt: Added missing space when using
recordto add new fields to a span that already has fields (#659) - Updated outdated documentation (#647)
0.2.3 (March 5, 2020)
Fixed
- env-filter: Regression where filter directives were selected in the order they were listed, rather than most specific first (#624)
0.2.2 (February 27, 2020)
Added
- fmt: Added
flatten_eventtoSubscriberBuilder(#599) - fmt: Added
with_leveltoSubscriberBuilder(#594)
0.2.1 (February 13, 2020)
Changed
- filter:
EnvFilterdirective selection now behaves correctly (i.e. likeenv_logger) (#583)
Fixed
- filter: Fixed
EnvFilterincorrectly allowing less-specific filter directives to enable events that are disabled by more-specific filters (#583) - filter: Multiple significant
EnvFilterperformance improvements, especially when filtering events generated bylogrecords (#578, #583) - filter: Replaced
BTreeMapwithVecinDirectiveSet, improving iteration performance significantly with typical numbers of filter directives (#580)
A big thank-you to @samschlegel for lots of help with EnvFilter performance
tuning in this release!
0.2.0 (February 4, 2020)
Breaking Changes
- fmt: Renamed
ContexttoFmtContext(#420, #425) - fmt: Renamed
BuildertoSubscriberBuilder(#420) - filter: Removed
Filter. UseEnvFilterinstead (#434)
Added
- registry:
Registry, aSubscriberimplementation thatLayers can use as a high-performance, in-memory span store. (#420, #425, #432, #433, #435) - registry: Added
LookupSpantrait, implemented bySubscribers to expose stored span data toLayers (#420) - fmt: Added
fmt::Layer, to allow composing log formatting with otherLayers - fmt: Added support for JSON field and event formatting (#377, #415)
- filter: Documentation for filtering directives (#554)
Changed
- fmt: Renamed
ContexttoFmtContext(#420, #425) (BREAKING) - fmt: Renamed
BuildertoSubscriberBuilder(#420) (BREAKING) - fmt: Reimplemented
fmt::Subscriberin terms of theRegistryandLayers (#420)
Removed
- filter: Removed
Filter. UseEnvFilterinstead (#434) (BREAKING)
Fixed
- fmt: Fixed memory leaks in the slab used to store per-span data (3c35048)
- fmt:
fmt::SubscriberBuilder::initnot setting uplogcompatibility (#489) - fmt: Spans closed by a child span closing not also closing their parents (#514)
- Layer: Fixed
Layeredsubscribers failing to downcast to their own type (#549) - Layer: Fixed
Layer::downcast_refreturning invalid references (#454)
0.2.0-alpha.6 (February 3, 2020)
Fixed
- fmt: Fixed empty
{}printed after spans with no fields (f079f2d) - fmt: Fixed inconsistent formatting when ANSI colors are disabled (506a482)
- fmt: Fixed misaligned levels when ANSI colors are disabled (eba1adb)
- Fixed warnings on nightly Rust compilers (#558)
0.2.0-alpha.5 (January 31, 2020)
Added
- env_filter: Documentation for filtering directives (#554)
- registry, env_filter: Updated
smallvecdependency to 0.1 (#543)
Fixed
- registry: Fixed a memory leak in the slab used to store per-span data (3c35048)
- Layer: Fixed
Layeredsubscribers failing to downcast to their own type (#549) - fmt: Fixed a panic when multiple layers insert
FormattedFieldsextensions from the same formatter type (1c3bb70) - fmt: Fixed
fmt::Layer::on_recordinserting a newFormattedFieldswhen formatted fields for a span already exist (1c3bb70)
0.2.0-alpha.4 (January 11, 2020)
Fixed
- registry: Removed inadvertently committed
dbg!macros (#533)
0.2.0-alpha.3 (January 10, 2020)
Added
- fmt: Public
FormattedFields::newconstructor (#478) - fmt: Added examples to
fmt::Layerdocumentation (#510) - Documentation now shows what feature flags are required by each API item (#525)
Fixed
- fmt: Missing space between timestamp and level (#480)
- fmt: Incorrect formatting with
with_target(false)(#481) - fmt:
fmt::SubscriberBuilder::initnot setting uplogcompatibility (#489) - registry: Spans exited out of order not being closed properly on exit (#509)
- registry: Memory leak when spans are closed by a child span closing (#514)
- registry: Spans closed by a child span closing not also closing their parents (#514)
- Compilation errors with
no-default-features(#499, #500)
0.2.0-alpha.2 (December 8, 2019)
Added
LookupSpansimplementation forLayered(#448)SpanRef::from_rootto iterate over a span's parents from the root (#460)Context::scope, to iterate over the current context from the root (#460)Context::lookup_current, which returns aSpanRefto the current span's data (#460)
Changed
- Lifetimes on some new
Contextmethods to be less restrictive (#460)
Fixed
Layer::downcast_refreturning invalid references (#454)- Compilation failure on 32-bit platforms (#462)
- Compilation failure with ANSI formatters (#438)
0.2.0-alpha.1 (November 18, 2019)
Added
Registry, a reusable span store thatLayers can use a high-performance, in-memory store. (#420, #425, #432, #433, #435)- Reimplemented
fmt::Subscriberin terms of theRegistryandLayers (#420) - Add benchmarks for fmt subscriber (#421)
- Add support for JSON field and event formatting (#377, #415)
Changed
- BREAKING: Change
fmt::format::FormatFieldsandfmt::format::FormatEventto accept a mandatoryFmtContext. TheseFormatFieldsandFormatEventwill likely see additional breaking changes in subsequent alpha. (#420, #425) - BREAKING: Removed
Filter. UseEnvFilterinstead (#434)
Contributors
Thanks to all the contributors to this release!
- @pimeys for #377 and #415
0.1.6 (October 29, 2019)
Added
- Add
initandtry_initfunctions toFmtSubscriber(#385) - Add
ChronoUtcandChronoLocaltimers, RFC 3339 support (#387) - Add
tracing::subscriber::set_defaultwhich sets the default subscriber and returns a drop guard. This drop guard will reset the dispatch on drop (#388).
Fixed
- Fix default level for
EnvFilter. SettingRUST_LOG=targetpreviously only theERRORlevel, while it should enable everything.tracing-subscribernow defaults toTRACEif no level is specified (#401) - Fix
tracing-logfeature flag for init + try_init. The feature flagtracing_logwas used instead of the correcttracing-log. As a result, bothtracing-logandtracing_logneeded to be specified in order to initialize the global logger. Onlytracing-logneeds to be specified now (#400).
Contributors
Thanks to all the contributors to this release!
- @emschwartz for #385, #387, #400 and #401
- @bIgBV for #388
0.1.5 (October 7, 2019)
Fixed
- Spans not being closed properly when
FmtSubscriber::current_spanis used (#371)
0.1.4 (September 26, 2019)
Fixed
- Spans entered twice on the same thread sometimes being completely exited when the more deeply-nested entry is exited (#361)
- Setting
with_ansi(false)onFmtSubscribernot disabling ANSI color formatting for timestamps (#354) - Incorrect reference counting in
FmtSubscriberthat could cause spans to not be closed when all references are dropped (#366)
0.1.3 (September 16, 2019)
Fixed
Layeredsubscribers not properly forwarding calls tocurrent_span(#350)
0.1.2 (September 12, 2019)
Fixed
EnvFilterignoring directives with targets that are the same number of characters (#333)EnvFilterfailing to properly apply filter directives to events generated fromlogrecords bytracing-log(#344)
Changed
- Renamed
FiltertoEnvFilter, deprecatedFilter(#339) - Renamed "filter" feature flag to "env-filter", deprecated "filter" (#339)
FmtSubscribernow defaults to enabling only theINFOlevel and above when a max level filter orEnvFilteris not set (#336)- Made
parking_lotdependency an opt-in feature flag (#348)
Added
EnvFilter::add_directiveto add new directives to filters after they are constructed (#334)fmt::Builder::with_max_levelto set a global level filter for aFmtSubscriberwithout requiring the use ofEnvFilter(#336)Layerimplementation forLevelFilter(#336)EnvFilternow implementsfmt::Display(#329)
Removed
- Removed dependency on
crossbeam-util(#348)
0.1.1 (September 4, 2019)
Fixed
- Potential double panic in
CurrentSpan(#325)
0.1.0 (September 3, 2019)
- Initial release