1# 0.3.18 (November 13, 2023)
2
3This release of `tracing-subscriber` adds support for the [`NO_COLOR`] environment
4variable (an informal standard to disable emitting ANSI color escape codes) in
5`fmt::Layer`, reintroduces support for the [`chrono`] crate, and increases the
6minimum supported Rust version (MSRV) to Rust 1.63.0.
7
8It also introduces several minor API improvements.
9
10### Added
11
12- **chrono**: Add [`chrono`] implementations of `FormatTime` ([#2690])
13- **subscriber**: Add support for the [`NO_COLOR`] environment variable in
14`fmt::Layer` ([#2647])
15- **fmt**: make `format::Writer::new()` public ([#2680])
16- **filter**: Implement `layer::Filter` for `Option<Filter>` ([#2407])
17
18### Changed
19
20- **log**: bump version of `tracing-log` to 0.2 ([#2772])
21- Increased minimum supported Rust version (MSRV) to 1.63.0+.
22
23[`chrono`]: https://github.com/chronotope/chrono
24[`NO_COLOR`]: https://no-color.org/
25[#2690]: https://github.com/tokio-rs/tracing/pull/2690
26[#2647]: https://github.com/tokio-rs/tracing/pull/2647
27[#2680]: https://github.com/tokio-rs/tracing/pull/2680
28[#2407]: https://github.com/tokio-rs/tracing/pull/2407
29[#2772]: https://github.com/tokio-rs/tracing/pull/2772
30
31Thanks to @shayne-fletcher, @dmlary, @kaifastromai, and @jsgf for contributing!
32
33# 0.3.17 (April 21, 2023)
34
35This release of `tracing-subscriber` fixes a build error when using `env-filter`
36with recent versions of the `regex` crate. It also introduces several minor API
37improvements.
38
39### Fixed
40
41- **env-filter**: Add "unicode-case" and "unicode-perl" to the `regex`
42  dependency, fixing a build error with recent versions of `regex` ([#2566])
43- A number of minor documentation typos and other fixes ([#2384], [#2378],
44  [#2368], [#2548])
45
46### Added
47
48- **filter**: Add `fmt::Display` impl for `filter::Targets` ([#2343])
49- **fmt**: Made `with_ansi(false)` no longer require the "ansi" feature, so that
50  ANSI formatting escapes can be disabled without requiring ANSI-specific
51  dependencies ([#2532])
52
53### Changed
54
55- **fmt**: Dim targets in the `Compact` formatter, matching the default
56  formatter ([#2409])
57
58Thanks to @keepsimple1, @andrewhalle, @LeoniePhiline, @LukeMathWalker,
59@howardjohn, @daxpedda, and @dbidwell94 for contributing to this release!
60
61[#2566]: https://github.com/tokio-rs/tracing/pull/2566
62[#2384]: https://github.com/tokio-rs/tracing/pull/2384
63[#2378]: https://github.com/tokio-rs/tracing/pull/2378
64[#2368]: https://github.com/tokio-rs/tracing/pull/2368
65[#2548]: https://github.com/tokio-rs/tracing/pull/2548
66[#2343]: https://github.com/tokio-rs/tracing/pull/2343
67[#2532]: https://github.com/tokio-rs/tracing/pull/2532
68[#2409]: https://github.com/tokio-rs/tracing/pull/2409
69
70# 0.3.16 (October 6, 2022)
71
72This release of `tracing-subscriber` fixes a regression introduced in
73[v0.3.15][subscriber-0.3.15] where `Option::None`'s `Layer` implementation would
74set the max level hint to `OFF`. In addition, it adds several new APIs,
75including the `Filter::event_enabled` method for filtering events based on
76fields values, and the ability to log internal errors that occur when writing a
77log line.
78
79This release also replaces the dependency on the unmaintained [`ansi-term`]
80crate with the [`nu-ansi-term`] crate, resolving an *informational* security
81advisory ([RUSTSEC-2021-0139]) for [`ansi-term`]'s maintainance status. This
82increases the minimum supported Rust version (MSRV) to Rust 1.50+, although the
83crate should still compile for the previous MSRV of Rust 1.49+ when the `ansi`
84feature is not enabled.
85
86### Fixed
87
88- **layer**: `Option::None`'s `Layer` impl always setting the `max_level_hint`
89  to `LevelFilter::OFF` ([#2321])
90- Compilation with `-Z minimal versions` ([#2246])
91- **env-filter**: Clarify that disabled level warnings are emitted by
92  `tracing-subscriber` ([#2285])
93
94### Added
95
96- **fmt**: Log internal errors to `stderr` if writing a log line fails ([#2102])
97- **fmt**: `FmtLayer::log_internal_errors` and
98  `FmtSubscriber::log_internal_errors` methods for configuring whether internal
99  writer errors are printed to `stderr` ([#2102])
100- **fmt**: `#[must_use]` attributes on builders to warn if a `Subscriber` is
101  configured but not set as the default subscriber ([#2239])
102- **filter**: `Filter::event_enabled` method for filtering an event based on its
103  fields ([#2245], [#2251])
104- **filter**: `Targets::default_level` accessor ([#2242])
105
106### Changed
107
108- **ansi**: Replaced dependency on unmaintained `ansi-term` crate with
109  `nu-ansi-term` (([#2287], fixes informational advisory [RUSTSEC-2021-0139])
110- `tracing-core`: updated to [0.1.30][core-0.1.30]
111- Minimum Supported Rust Version (MSRV) increased to Rust 1.50+ (when the
112  `ansi`) feature flag is enabled ([#2287])
113
114### Documented
115
116- **fmt**: Correct inaccuracies in `fmt::init` documentation ([#2224])
117- **filter**: Fix incorrect doc link in `filter::Not` combinator ([#2249])
118
119Thanks to new contributors @cgbur, @DesmondWillowbrook, @RalfJung, and
120@poliorcetics, as well as returning contributors @CAD97, @connec, @jswrenn,
121@guswynn, and @bryangarza, for contributing to this release!
122
123[nu-ansi-term]: https://github.com/nushell/nu-ansi-term
124[ansi_term]: https://github.com/ogham/rust-ansi-term
125[RUSTSEC-2021-0139]: https://rustsec.org/advisories/RUSTSEC-2021-0139.html
126[core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30
127[subscriber-0.3.15]: https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.15
128[#2321]: https://github.com/tokio-rs/tracing/pull/2321
129[#2246]: https://github.com/tokio-rs/tracing/pull/2246
130[#2285]: https://github.com/tokio-rs/tracing/pull/2285
131[#2102]: https://github.com/tokio-rs/tracing/pull/2102
132[#2239]: https://github.com/tokio-rs/tracing/pull/2239
133[#2245]: https://github.com/tokio-rs/tracing/pull/2245
134[#2251]: https://github.com/tokio-rs/tracing/pull/2251
135[#2287]: https://github.com/tokio-rs/tracing/pull/2287
136[#2224]: https://github.com/tokio-rs/tracing/pull/2224
137[#2249]: https://github.com/tokio-rs/tracing/pull/2249
138
139# 0.3.15 (Jul 20, 2022)
140
141This release fixes a bug where the `reload` layer would fail to pass through
142`max_level_hint` to the underlying layer, potentially breaking filtering.
143
144### Fixed
145
146- **reload**: pass through `max_level_hint` to the inner `Layer` ([#2204])
147
148Thanks to @guswynn for contributing to this release!
149
150[#2204]: https://github.com/tokio-rs/tracing/pull/2204
151
152# 0.3.14 (Jul 1, 2022)
153
154This release fixes multiple filtering bugs in the `Layer` implementations for
155`Option<impl Layer>` and `Vec<impl Layer>`.
156
157### Fixed
158
159- **layer**: `Layer::event_enabled` implementation for `Option<impl Layer<S>>`
160  returning `false` when the `Option` is `None`, disabling all events globally
161  ([#2193])
162- **layer**: `Layer::max_level_hint` implementation for `Option<impl Layer<S>>`
163  incorrectly disabling max level filtering when the option is `None` ([#2195])
164- **layer**: `Layer::max_level_hint` implementation for `Vec<impl Layer<S>>`
165  returning `LevelFilter::ERROR` rather than `LevelFilter::OFF` when the `Vec`
166  is empty ([#2195])
167
168Thanks to @CAD97 and @guswynn for contributing to this release!
169
170[#2193]: https://github.com/tokio-rs/tracing/pull/2193
171[#2195]: https://github.com/tokio-rs/tracing/pull/2195
172
173# 0.3.13 (Jun 30, 2022) (YANKED)
174
175This release of `tracing-subscriber` fixes a compilation failure due to an
176incorrect `tracing-core` dependency that was introduced in v0.3.12.
177
178### Changed
179
180- **tracing_core**: Updated minimum dependency version to 0.1.28 ([#2190])
181
182[#2190]: https://github.com/tokio-rs/tracing/pull/2190
183
184# 0.3.12 (Jun 29, 2022) (YANKED)
185
186This release of `tracing-subscriber` adds a new `Layer::event_enabled` method,
187which allows `Layer`s to filter events *after* their field values are recorded;
188a `Filter` implementation for `reload::Layer`, to make using `reload` with
189per-layer filtering more ergonomic, and additional inherent method downcasting
190APIs for the `Layered` type. In addition, it includes dependency updates, and
191minor fixes for documentation and feature flagging.
192
193### Added
194
195- **layer**: `Layer::event_enabled` method, which can be implemented to filter
196  events based on their field values ([#2008])
197- **reload**: `Filter` implementation for `reload::Layer` ([#2159])
198- **layer**: `Layered::downcast_ref` and `Layered::is` inherent methods
199  ([#2160])
200
201### Changed
202
203- **parking_lot**: Updated dependency on `parking_lot` to 0.13.0 ([#2143])
204- Replaced `lazy_static` dependency with `once_cell` ([#2147])
205
206### Fixed
207
208- Don't enable `tracing-core` features by default ([#2107])
209- Several documentation link and typo fixes ([#2064], [#2068], #[2077], [#2161],
210  [#1088])
211
212Thanks to @ben0x539, @jamesmunns, @georgemp, @james7132, @jswrenn, @CAD97, and
213@guswynn for contributing to this release!
214
215[#2008]: https://github.com/tokio-rs/tracing/pull/2008
216[#2159]: https://github.com/tokio-rs/tracing/pull/2159
217[#2160]: https://github.com/tokio-rs/tracing/pull/2160
218[#2143]: https://github.com/tokio-rs/tracing/pull/2143
219[#2107]: https://github.com/tokio-rs/tracing/pull/2107
220[#2064]: https://github.com/tokio-rs/tracing/pull/2064
221[#2068]: https://github.com/tokio-rs/tracing/pull/2068
222[#2077]: https://github.com/tokio-rs/tracing/pull/2077
223[#2161]: https://github.com/tokio-rs/tracing/pull/2161
224[#1088]: https://github.com/tokio-rs/tracing/pull/1088
225
226# 0.3.11 (Apr 9, 2022)
227
228This is a bugfix release for the `Filter` implementation for `EnvFilter` added
229in [v0.3.10].
230
231### Fixed
232
233- **env-filter**: Added missing `Filter::on_record` callback to `EnvFilter`'s
234  `Filter` impl ([#2058])
235- **env-filter**: Fixed method resolution issues when calling `EnvFilter`
236  methods with both the `Filter` and `Layer` traits in scope ([#2057])
237- **env-filter**: Fixed `EnvFilter::builder().parse()` and other parsing methods
238  returning an error when parsing an empty string ([#2052])
239
240Thanks to new contributor @Ma124 for contributing to this release!
241
242[v0.3.10]: https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.10
243[#2058]: https://github.com/tokio-rs/tracing/pull/2058
244[#2057]: https://github.com/tokio-rs/tracing/pull/2057
245[#2052]: https://github.com/tokio-rs/tracing/pull/2052
246
247# 0.3.10 (Apr 1, 2022)
248
249This release adds several new features, including a `Filter` implementation and
250new builder API for `EnvFilter`, support for using a `Vec<L> where L: Layer` as
251a `Layer`, and a number of smaller API improvements to make working with dynamic
252and reloadable layers easier.
253
254### Added
255
256- **registry**: Implement `Filter` for `EnvFilter`, allowing it to be used with
257  per-layer filtering ([#1983])
258- **registry**: `Filter::on_new_span`, `Filter::on_enter`,
259  `Filter::on_exit`, `Filter::on_close` and `Filter::on_record` callbacks to
260  allow `Filter`s to track span states internally ([#1973], [#2017], [#2031])
261- **registry**: `Filtered::filter` and `Filtered::filter_mut` accessors
262  ([#1959])
263- **registry**: `Filtered::inner` and `Filtered::inner_mut` accessors to borrow
264  the wrapped `Layer` ([#2034])
265- **layer**: Implement `Layer` for `Vec<L: Layer>`, to allow composing together
266  a dynamically sized list of `Layer`s ([#2027])
267- **layer**: `Layer::boxed` method to make type-erasing `Layer`s easier
268  ([#2026])
269- **fmt**: `fmt::Layer::writer` and `fmt::Layer::writer_mut` accessors ([#2034])
270- **fmt**: `fmt::Layer::set_ansi` method to allow changing the ANSI formatting
271  configuration at runtime ([#2034])
272- **env-filter**: `EnvFilter::builder` to configure a new `EnvFilter` prior to
273  parsing it ([#2035])
274- Several documentation fixes and improvements ([#1972], [#1971], [#2023],
275  [#2023])
276
277### Fixed
278
279- **fmt**: `fmt::Layer`'s auto traits no longer depend on the `Subscriber` type
280  parameter's auto traits ([#2025])
281- **env-filter**: Fixed missing help text when the `ansi` feature is disabled
282  ([#2029])
283
284Thanks to new contributors @TimoFreiberg and @wagenet, as well as @CAD97 for
285contributing to this release!
286
287[#1983]: https://github.com/tokio-rs/tracing/pull/1983
288[#1973]: https://github.com/tokio-rs/tracing/pull/1973
289[#2017]: https://github.com/tokio-rs/tracing/pull/2017
290[#2031]: https://github.com/tokio-rs/tracing/pull/2031
291[#1959]: https://github.com/tokio-rs/tracing/pull/1959
292[#2034]: https://github.com/tokio-rs/tracing/pull/2034
293[#2027]: https://github.com/tokio-rs/tracing/pull/2027
294[#2026]: https://github.com/tokio-rs/tracing/pull/2026
295[#2035]: https://github.com/tokio-rs/tracing/pull/2035
296[#1972]: https://github.com/tokio-rs/tracing/pull/1972
297[#1971]: https://github.com/tokio-rs/tracing/pull/1971
298[#2023]: https://github.com/tokio-rs/tracing/pull/2023
299[#2025]: https://github.com/tokio-rs/tracing/pull/2025
300[#2029]: https://github.com/tokio-rs/tracing/pull/2029
301
302# 0.3.9 (Feb 17, 2022)
303
304This release updates the minimum supported Rust version (MSRV) to 1.49.0, and
305updates the (optional) dependency on `parking_lot` to v0.12.
306
307### Changed
308
309- Updated minimum supported Rust version (MSRV) to 1.49.0 ([#1913])
310- `parking_lot`: updated to v0.12 ([008339d])
311
312### Added
313
314- **fmt**: Documentation improvements ([#1926], [#1927])
315
316[#1913]: https://github.com/tokio-rs/tracing/pull/1913
317[#1926]: https://github.com/tokio-rs/tracing/pull/1926
318[#1927]: https://github.com/tokio-rs/tracing/pull/1927
319[008339d]: https://github.com/tokio-rs/tracing/commit/008339d1e8750ffe7b4634fc7789bda0c522424f
320
321# 0.3.8 (Feb 4, 2022)
322
323This release adds *experimental* support for recording structured field
324values using the [`valuable`] crate to the `format::Json` formatter. In
325particular, user-defined types which are recorded using their
326[`valuable::Valuable`] implementations will be serialized as JSON objects,
327rather than using their `fmt::Debug` representation. See [this blog post][post]
328for details on `valuable`.
329
330Note that `valuable` support currently requires `--cfg tracing_unstable`. See
331the documentation for details.
332
333Additionally, this release includes a number of other smaller API improvements.
334
335### Added
336
337- **json**: Experimental support for recording [`valuable`] values as structured
338  JSON ([#1862], [#1901])
339- **filter**: `Targets::would_enable` method for testing if a `Targets` filter
340  would enable a given target ([#1903])
341- **fmt**: `map_event_format`, `map_fmt_fields`, and `map_writer` methods to
342  `fmt::Layer` and `fmt::SubscriberBuilder` ([#1871])
343
344### Changed
345
346- `tracing-core`: updated to [0.1.22][core-0.1.22]
347
348### Fixed
349
350- Set `smallvec` minimal version to 1.2.0, to fix compilation errors with `-Z
351  minimal-versions` ([#1890])
352- Minor documentation fixes ([#1902], [#1893])
353
354Thanks to @guswynn, @glts, and @lilyball for contributing to this release!
355
356[`valuable`]: https://crates.io/crates/valuable
357[`valuable::Valuable`]: https://docs.rs/valuable/latest/valuable/trait.Valuable.html
358[post]: https://tokio.rs/blog/2021-05-valuable
359[core-0.1.22]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.22
360[#1862]: https://github.com/tokio-rs/tracing/pull/1862
361[#1901]: https://github.com/tokio-rs/tracing/pull/1901
362[#1903]: https://github.com/tokio-rs/tracing/pull/1903
363[#1871]: https://github.com/tokio-rs/tracing/pull/1871
364[#1890]: https://github.com/tokio-rs/tracing/pull/1890
365[#1902]: https://github.com/tokio-rs/tracing/pull/1902
366[#1893]: https://github.com/tokio-rs/tracing/pull/1893
367
368# 0.3.7 (Jan 25, 2022)
369
370This release adds combinators for combining filters.
371
372Additionally, this release also updates the `thread-local` crate to v1.1.4,
373fixing warnings for the security advisory [RUSTSEC-2022-0006]. Note that
374previous versions of `tracing-subscriber` did not use any of the `thread-local`
375crate's APIs effected by the vulnerability. However, updating the version fixes
376warnings emitted by `cargo audit` and similar tools.
377
378### Added
379
380- **filter**: Added combinators for combining filters ([#1578])
381
382### Fixed
383
384- **registry**: Updated `thread-local` to v1.1.4 ([#1858])
385
386Thanks to new contributor @matze for contributing to this release!
387
388[RUSTSEC-2022-0006]: https://rustsec.org/advisories/RUSTSEC-2022-0006
389[#1578]: https://github.com/tokio-rs/tracing/pull/1578
390[#1858]: https://github.com/tokio-rs/tracing/pull/1858
391
392# 0.3.6 (Jan 14, 2022)
393
394This release adds configuration options to `tracing_subscriber::fmt` to log
395source code locations for events.
396### Added
397
398- **fmt**: Added `with_file` and `with_line_number`
399  configuration methods to `fmt::Format`, `fmt::SubscriberBuilder`, and
400  `fmt::Layer` ([#1773])
401
402### Fixed
403
404- **fmt**: Removed incorrect leading comma from span fields with the `Pretty`
405  formatter ([#1833])
406
407### Deprecated
408
409- **fmt**: Deprecated `Pretty::with_source_location`, as it can now be replaced
410  by the more general `Format`, `SubscriberBuilder`, and `Layer` methods
411  ([#1773])
412
413Thanks to new contributor @renecouto for contributing to this release!
414
415[#1773]: https://github.com/tokio-rs/tracing/pull/1773
416[#1833]: https://github.com/tokio-rs/tracing/pull/1833
417
418# 0.3.5 (Dec 29, 2021)
419
420This release re-enables `RUST_LOG` filtering in `tracing_subscriber::fmt`'s
421default initialization methods, and adds an `OffsetLocalTime` formatter for
422using local timestamps with the `time` crate.
423
424### Added
425
426- **fmt**: Added `OffsetLocalTime` formatter to `fmt::time` for formatting local
427  timestamps with a fixed offset ([#1772])
428
429### Fixed
430
431- **fmt**: Added a `Targets` filter to `fmt::init()` and `fmt::try_init()` when
432  the "env-filter" feature is disabled, so that `RUST_LOG` is still honored
433  ([#1781])
434
435Thanks to @marienz and @ishitatsuyuki for contributing to this release!
436
437[#1772]: https://github.com/tokio-rs/tracing/pull/1772
438[#1781]: https://github.com/tokio-rs/tracing/pull/1781
439
440# 0.3.4 (Dec 23, 2021)
441
442This release contains bugfixes for the `fmt` module, as well as documentation
443improvements.
444
445### Fixed
446
447- **fmt**: Fixed `fmt` not emitting log lines when timestamp formatting fails
448  ([#1689])
449- **fmt**: Fixed double space before thread IDs with `Pretty` formatter
450  ([#1778])
451- Several documentation improvements ([#1608], [#1699], [#1701])
452
453[#1689]: https://github.com/tokio-rs/tracing/pull/1689
454[#1778]: https://github.com/tokio-rs/tracing/pull/1778
455[#1608]: https://github.com/tokio-rs/tracing/pull/1608
456[#1699]: https://github.com/tokio-rs/tracing/pull/1699
457[#1701]: https://github.com/tokio-rs/tracing/pull/1701
458
459Thanks to new contributors @Swatinem and @rukai for contributing to this
460release!
461
462# 0.3.3 (Nov 29, 2021)
463
464This release fixes a pair of regressions in `tracing-subscriber`'s `fmt` module.
465
466### Fixed
467
468- **fmt**: Fixed missing event fields with `Compact` formatter ([#1755])
469- **fmt**: Fixed `PrettyFields` formatter (and thus `format::Pretty` event
470  formatter) ignoring the `fmt::Layer`'s ANSI color code configuration ([#1747])
471
472[#1755]: https://github.com/tokio-rs/tracing/pull/1755
473[#1747]: https://github.com/tokio-rs/tracing/pull/1747
474
475# 0.3.2 (Nov 19, 2021)
476
477### Fixed
478
479- **fmt**: Fixed `MakeWriter` filtering not working with `BoxMakeWriter`
480  ([#1694])
481
482### Added
483
484- **fmt**: `Writer::has_ansi_escapes` method to check if an output supports ANSI
485  terminal formatting escape codes ([#1696])
486- **fmt**: Added additional ANSI terminal formatting to field formatters when
487  supported ([#1702])
488- **fmt**: Added `FmtContext::span_scope`, `FmtContext::event_scope`, and
489  `FmtContext::parent_span` methods for accessing the current span and its scope
490  when formatting an event ([#1728])
491- **fmt**: Improved documentation on implementing event formatters ([#1727])
492
493[#1694]: https://github.com/tokio-rs/tracing/pull/1694
494[#1696]: https://github.com/tokio-rs/tracing/pull/1696
495[#1702]: https://github.com/tokio-rs/tracing/pull/1702
496[#1728]: https://github.com/tokio-rs/tracing/pull/1728
497[#1727]: https://github.com/tokio-rs/tracing/pull/1727
498# 0.3.1 (Oct 25, 2021)
499
500This release fixes a few issues related to feature flagging.
501
502### Fixed
503
504- **time**: Compilation error when enabling the "time" feature flag without also
505  enabling the "local-time" feature flag ([#1685])
506- **registry**: Unused method warnings when the "std" feature is enabled but the
507  "registry" feature is disabled ([#1686])
508
509[#1685]: https://github.com/tokio-rs/tracing/pull/1685
510[#1686]: https://github.com/tokio-rs/tracing/pull/1686
511
512# 0.3.0 (Oct 22, 2021)
513
514This is a breaking release of `tracing-subscriber`. The primary breaking change
515in this release is the removal of the dependency on the [`chrono` crate], due to
516[RUSTSEC-2020-0159]. To replace `chrono`, support is added for formatting
517timestamps using the [`time` crate] instead.
518
519In addition, this release includes a number of other breaking API changes, such
520as adding (limited) support for `#![no_std]` targets, removing previously
521deprecated APIs, and more.
522
523### Breaking Changes
524
525- Removed APIs deprecated in the v0.2.x release series.
526- Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
527- Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn Layer<S> + ...>`
528  ([#1649])
529- Replaced the [`chrono` crate] with the [`time` crate] for timestamp formatting, to
530  resolve [RUSTSEC-2020-0159] ([#1646])
531- Removed `json` and `env-filter` from default features. They must now be
532  enabled explictly ([#1647]). This means that `RUST_LOG`-based filters _will not_
533  work unless the `env-filter` feature is enabled.
534- Changed `FormatEvent::format_event` and `FormatFields::format_fields`
535  trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write`
536  trait object ([#1661])
537- Changed the signature of the `MakeWriter` trait by adding a lifetime parameter
538  ([#781])
539
540### Changed
541
542- **layer**: Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
543- **fmt**: Changed `FormatEvent::format_event` and `FormatFields::format_fields`
544  trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write`
545  trait object ([#1661])
546- **json**, **env-filter**: `json` and `env-filter` feature flags are no longer
547  enabled by default ([#1647])
548### Removed
549
550- Removed deprecated `CurrentSpan` type ([#1320])
551- **registry**: Removed deprecated `SpanRef::parents` iterator, replaced by
552  `SpanRef::scope` in [#1431] ([#1648)])
553- **layer**: Removed deprecated `Context::scope` iterator, replaced by
554  `Context::span_scope` and `Context::event_scope` in [#1431] and [#1434]
555  ([#1648)])
556- **layer**: Removed `Layer` impl for `Arc<L: Layer<S>>` and
557   `Arc<dyn Layer<S> + ...>`. These interfere with per-layer filtering. ([#1649])
558- **fmt**: Removed deprecated `LayerBuilder` type ([#1673])
559- **fmt**: Removed `fmt::Layer::on_event` (renamed to `fmt::Layer::fmt_event`)
560  ([#1673])
561- **fmt**, **chrono**: Removed the `chrono` feature flag and APIs for using the
562  [`chrono` crate] for timestamp formatting ([#1646])
563### Added
564
565- **fmt**, **time**: `LocalTime` and `UtcTime` types for formatting timestamps
566  using the [`time` crate] ([#1646])
567- **fmt**: Added a lifetime parameter to the `MakeWriter` trait, allowing it to
568  return a borrowed writer. This enables implementations of `MakeWriter` for
569  types such as `Mutex<T: io::Write>` and `std::fs::File`. ([#781])
570- **env-filter**: Documentation improvements ([#1637])
571- Support for some APIs on `#![no_std]` targets, by disabling the `std` feature
572  flag ([#1660])
573
574Thanks to @Folyd and @nmathewson for contributing to this release!
575
576[#1320]: https://github.com/tokio-rs/tracing/pull/1320
577[#1673]: https://github.com/tokio-rs/tracing/pull/1673
578[#1674]: https://github.com/tokio-rs/tracing/pull/1674
579[#1646]: https://github.com/tokio-rs/tracing/pull/1646
580[#1647]: https://github.com/tokio-rs/tracing/pull/1647
581[#1648]: https://github.com/tokio-rs/tracing/pull/1648
582[#1649]: https://github.com/tokio-rs/tracing/pull/1649
583[#1660]: https://github.com/tokio-rs/tracing/pull/1660
584[#1661]: https://github.com/tokio-rs/tracing/pull/1661
585[#1431]: https://github.com/tokio-rs/tracing/pull/1431
586[#1434]: https://github.com/tokio-rs/tracing/pull/1434
587[#781]: https://github.com/tokio-rs/tracing/pull/781
588
589[`chrono` crate]: https://crates.io/crates/chrono
590[`time` crate]: https://crates.io/crates/time
591[RUSTSEC-2020-0159]: https://rustsec.org/advisories/RUSTSEC-2020-0159.html
592
593# 0.2.25 (October 5, 2021)
594
595This release fixes an issue where a `Layer` implementation's custom
596`downcast_raw` implementation was lost when wrapping that layer with a per-layer
597filter.
598
599### Fixed
600
601- **registry**: Forward `Filtered::downcast_raw` to wrapped `Layer` ([#1619])
602
603### Added
604
605- Documentation improvements ([#1596], [#1601])
606
607Thanks to @bryanburgers for contributing to this release!
608
609[#1619]: https://github.com/tokio-rs/tracing/pull/1619
610[#1601]: https://github.com/tokio-rs/tracing/pull/1601
611[#1596]: https://github.com/tokio-rs/tracing/pull/1596
612
613# 0.2.24 (September 19, 2021)
614
615This release contains a number of bug fixes, including a fix for
616`tracing-subscriber` failing to compile on the minimum supported Rust version of
6171.42.0. It also adds `IntoIterator` implementations for the `Targets` type.
618
619### Fixed
620
621- Fixed compilation on Rust 1.42.0 ([#1580], [#1581])
622- **registry**: Ensure per-layer filter `enabled` state is cleared when a global
623  filter short-circuits filter evaluation ([#1575])
624- **layer**: Fixed `Layer::on_layer` not being called for `Box`ed `Layer`s,
625  which broke  per-layer filtering ([#1576])
626
627### Added
628
629- **filter**: Added `Targets::iter`, returning an iterator over the set of
630  target-level pairs enabled by a `Targets` filter ([#1574])
631- **filter**:  Added `IntoIterator` implementations for `Targets` and `&Targets`
632  ([#1574])
633
634Thanks to new contributor @connec for contributing to this release!
635
636[#1580]: https://github.com/tokio-rs/tracing/pull/1580
637[#1581]: https://github.com/tokio-rs/tracing/pull/1581
638[#1575]: https://github.com/tokio-rs/tracing/pull/1575
639[#1576]: https://github.com/tokio-rs/tracing/pull/1576
640[#1574]: https://github.com/tokio-rs/tracing/pull/1574
641
642# 0.2.23 (September 16, 2021)
643
644This release fixes a few bugs in the per-layer filtering API added in v0.2.21.
645
646### Fixed
647
648- **env-filter**: Fixed excessive `EnvFilter` memory use ([#1568])
649- **filter**: Fixed a panic that may occur in debug mode when using per-layer
650  filters together with global filters ([#1569])
651- Fixed incorrect documentation formatting ([#1572])
652
653[#1568]: https://github.com/tokio-rs/tracing/pull/1568
654[#1569]: https://github.com/tokio-rs/tracing/pull/1569
655[#1572]: https://github.com/tokio-rs/tracing/pull/1572
656
657# 0.2.22 (September 13, 2021)
658
659This fixes a regression where the `filter::ParseError` type was accidentally
660renamed.
661
662### Fixed
663
664- **filter**: Fix `filter::ParseError` accidentally being renamed to
665  `filter::DirectiveParseError` ([#1558])
666
667[#1558]: https://github.com/tokio-rs/tracing/pull/1558
668
669# 0.2.21 (September 12, 2021)
670
671This release introduces the [`Filter`] trait, a new API for [per-layer
672filtering][plf]. This allows controlling which spans and events are recorded by
673various layers individually, rather than globally.
674
675In addition, it adds a new [`Targets`] filter, which provides a lighter-weight
676version of the filtering provided by [`EnvFilter`], as well as other smaller API
677improvements and fixes.
678
679### Deprecated
680
681- **registry**: `SpanRef::parent_id`, which cannot properly support per-layer
682  filtering. Use `.parent().map(SpanRef::id)` instead. ([#1523])
683
684### Fixed
685
686- **layer** `Context` methods that are provided when the `Subscriber` implements
687  `LookupSpan` no longer require the "registry" feature flag ([#1525])
688- **layer** `fmt::Debug` implementation for `Layered` no longer requires the `S`
689  type parameter to implement `Debug` ([#1528])
690
691### Added
692
693- **registry**: `Filter` trait, `Filtered` type, `Layer::with_filter` method,
694  and other APIs for per-layer filtering ([#1523])
695- **filter**: `FilterFn` and `DynFilterFn` types that implement global (`Layer`)
696  and per-layer (`Filter`) filtering for closures and function pointers
697  ([#1523])
698- **filter**: `Targets` filter, which implements a lighter-weight form of
699  `EnvFilter`-like filtering ([#1550])
700- **env-filter**: Added support for filtering on floating-point values ([#1507])
701- **layer**: `Layer::on_layer` callback, called when layering the `Layer` onto a
702`Subscriber` ([#1523])
703- **layer**: `Layer` implementations for `Box<L>` and `Arc<L>` where `L: Layer`
704  ([#1536])
705- **layer**: `Layer` implementations for `Box<dyn Layer<S> + Send + Sync + 'static>`
706  and `Arc<dyn Layer<S> + Send + Sync + 'static>` ([#1536])
707- A number of small documentation fixes and improvements ([#1553], [#1544],
708  [#1539], [#1524])
709
710Special thanks to new contributors @jsgf and @maxburke for contributing to this
711release!
712
713[`Filter`]: https://docs.rs/tracing-subscriber/0.2.21/tracing_subscriber/layer/trait.Filter.html
714[plf]: https://docs.rs/tracing-subscriber/0.2.21/tracing_subscriber/layer/index.html#per-layer-filtering
715[`Targets`]: https://docs.rs/tracing-subscriber/0.2.21/tracing_subscriber/filter/struct.Targets.html
716[`EnvFilter`]: https://docs.rs/tracing-subscriber/0.2.21/tracing_subscriber/filter/struct.EnvFilter.html
717[#1507]: https://github.com/tokio-rs/tracing/pull/1507
718[#1523]: https://github.com/tokio-rs/tracing/pull/1523
719[#1524]: https://github.com/tokio-rs/tracing/pull/1524
720[#1525]: https://github.com/tokio-rs/tracing/pull/1525
721[#1528]: https://github.com/tokio-rs/tracing/pull/1528
722[#1539]: https://github.com/tokio-rs/tracing/pull/1539
723[#1544]: https://github.com/tokio-rs/tracing/pull/1544
724[#1550]: https://github.com/tokio-rs/tracing/pull/1550
725[#1553]: https://github.com/tokio-rs/tracing/pull/1553
726
727# 0.2.20 (August 17, 2021)
728
729### Fixed
730
731- **fmt**: Fixed `fmt` printing only the first `source` for errors with a chain
732  of sources ([#1460])
733- **fmt**: Fixed missing space between level and event in the `Pretty` formatter
734  ([#1498])
735- **json**: Fixed `Json` formatter not honoring `without_time` and `with_level`
736  configurations ([#1463])
737
738### Added
739
740- **registry**: Improved panic message when cloning a span whose ID doesn't
741  exist, to aid in debugging issues with multiple subscribers ([#1483])
742- **registry**: Improved documentation on span ID generation ([#1453])
743
744[#1460]: https://github.com/tokio-rs/tracing/pull/1460
745[#1483]: https://github.com/tokio-rs/tracing/pull/1483
746[#1463]: https://github.com/tokio-rs/tracing/pull/1463
747[#1453]: https://github.com/tokio-rs/tracing/pull/1453
748[#1498]: https://github.com/tokio-rs/tracing/pull/1498
749
750Thanks to new contributors @joshtriplett and @lerouxrgd, and returning
751contributor @teozkr, for contributing to this release!
752
753# 0.2.19 (June 25, 2021)
754
755### Deprecated
756
757- **registry**: `SpanRef::parents`, `SpanRef::from_root`, and `Context::scope`
758  iterators, which are replaced by new `SpanRef::scope` and `Scope::from_root`
759  iterators ([#1413])
760
761### Added
762
763- **registry**: `SpanRef::scope` method, which returns a leaf-to-root `Iterator`
764  including the leaf span ([#1413])
765- **registry**: `Scope::from_root` method, which reverses the `scope` iterator
766  to iterate root-to-leaf ([#1413])
767- **registry**: `Context::event_span` method, which looks up the parent span of
768  an event ([#1434])
769- **registry**: `Context::event_scope` method, returning a `Scope` iterator over
770  the span scope of an event ([#1434])
771- **fmt**: `MakeWriter::make_writer_for` method, which allows returning a
772  different writer based on a span or event's metadata ([#1141])
773- **fmt**: `MakeWriterExt` trait, with `with_max_level`, `with_min_level`,
774  `with_filter`, `and`, and `or_else` combinators ([#1274])
775- **fmt**: `MakeWriter` implementation for `Arc<W> where &W: io::Write`
776  ([#1274])
777
778Thanks to @teozkr and @Folyd for contributing to this release!
779
780[#1413]: https://github.com/tokio-rs/tracing/pull/1413
781[#1434]: https://github.com/tokio-rs/tracing/pull/1434
782[#1141]: https://github.com/tokio-rs/tracing/pull/1141
783[#1274]: https://github.com/tokio-rs/tracing/pull/1274
784
785# 0.2.18 (April 30, 2021)
786
787### Deprecated
788
789- Deprecated the `CurrentSpan` type, which is inefficient and largely superseded
790  by the `registry` API ([#1321])
791
792### Fixed
793
794- **json**: Invalid JSON emitted for events in spans with no fields ([#1333])
795- **json**: Missing span data for synthesized new span, exit, and close events
796  ([#1334])
797- **fmt**: Extra space before log lines when timestamps are disabled ([#1355])
798
799### Added
800
801- **env-filter**: Support for filters on spans whose names contain any
802  characters other than `{` and `]` ([#1368])
803
804Thanks to @Folyd, and new contributors @akinnane and @aym-v for contributing to
805this release!
806
807[#1321]: https://github.com/tokio-rs/tracing/pull/1321
808[#1333]: https://github.com/tokio-rs/tracing/pull/1333
809[#1334]: https://github.com/tokio-rs/tracing/pull/1334
810[#1355]: https://github.com/tokio-rs/tracing/pull/1355
811[#1368]: https://github.com/tokio-rs/tracing/pull/1368
812
813# 0.2.17 (March 12, 2021)
814
815### Fixed
816
817- **fmt**: `Pretty` formatter now honors `with_ansi(false)` to disable ANSI
818  terminal formatting ([#1240])
819- **fmt**: Fixed extra padding when using `Pretty` formatter ([#1275])
820- **chrono**: Removed extra trailing space with `ChronoLocal` time formatter
821  ([#1103])
822
823### Added
824
825- **fmt**: Added `FmtContext::current_span()` method, returning the current span
826  ([#1290])
827- **fmt**: `FmtSpan` variants may now be combined using the `|` operator for
828  more granular control over what span events are generated ([#1277])
829
830Thanks to new contributors @cratelyn, @dignati, and @zicklag, as well as @Folyd,
831@matklad, and @najamelan, for contributing to this release!
832
833[#1240]: https://github.com/tokio-rs/tracing/pull/1240
834[#1275]: https://github.com/tokio-rs/tracing/pull/1275
835[#1103]: https://github.com/tokio-rs/tracing/pull/1103
836[#1290]: https://github.com/tokio-rs/tracing/pull/1290
837[#1277]: https://github.com/tokio-rs/tracing/pull/1277
838
839# 0.2.16 (February 19, 2021)
840
841### Fixed
842
843- **env-filter**: Fixed directives where the level is in mixed case (such as
844  `Info`) failing to parse ([#1126])
845- **fmt**: Fixed `fmt::Subscriber` not providing a max-level hint ([#1251])
846- `tracing-subscriber` no longer enables `tracing` and `tracing-core`'s default
847  features ([#1144])
848
849### Changed
850
851- **chrono**: Updated `chrono` dependency to 0.4.16 ([#1189])
852- **log**: Updated `tracing-log` dependency to 0.1.2
853
854Thanks to @salewski, @taiki-e, @davidpdrsn and @markdingram for contributing to
855this release!
856
857[#1126]: https://github.com/tokio-rs/tracing/pull/1126
858[#1251]: https://github.com/tokio-rs/tracing/pull/1251
859[#1144]: https://github.com/tokio-rs/tracing/pull/1144
860[#1189]: https://github.com/tokio-rs/tracing/pull/1189
861
862# 0.2.15 (November 2, 2020)
863
864### Fixed
865
866- **fmt**: Fixed wrong lifetime parameters on `FormatFields` impl for
867  `FmtContext` ([#1082])
868
869### Added
870
871- **fmt**: `format::Pretty`, an aesthetically pleasing, human-readable event
872  formatter for local development and user-facing CLIs ([#1080])
873- **fmt**: `FmtContext::field_format`, which returns the subscriber's field
874  formatter ([#1082])
875
876[#1082]: https://github.com/tokio-rs/tracing/pull/1082
877[#1080]: https://github.com/tokio-rs/tracing/pull/1080
878
879# 0.2.14 (October 22, 2020)
880
881### Fixed
882
883- **registry**: Fixed `Registry::new` allocating an excessively large amount of
884  memory, most of which would never be used ([#1064])
885
886### Changed
887
888- **registry**: Improved `new_span` performance by reusing `HashMap` allocations
889  for `Extensions` ([#1064])
890- **registry**: Significantly improved the performance of `Registry::enter` and
891  `Registry::exit` ([#1058])
892
893[#1064]: https://github.com/tokio-rs/tracing/pull/1064
894[#1058]: https://github.com/tokio-rs/tracing/pull/1058
895
896# 0.2.13 (October 7, 2020)
897
898### Changed
899
900- Updated `tracing-core` to 0.1.17 ([#992])
901
902### Added
903
904- **env-filter**: Added support for filtering on targets which contain dashes
905  ([#1014])
906- **env-filter**: Added a warning when creating an `EnvFilter` that contains
907  directives that would enable a level disabled by the `tracing` crate's
908  `static_max_level` features ([#1021])
909
910Thanks to @jyn514 and @bkchr for contributing to this release!
911
912[#992]: https://github.com/tokio-rs/tracing/pull/992
913[#1014]: https://github.com/tokio-rs/tracing/pull/1014
914[#1021]: https://github.com/tokio-rs/tracing/pull/1021
915
916# 0.2.12 (September 11, 2020)
917
918### Fixed
919
920- **env-filter**: Fixed a regression where `Option<Level>` lost its
921  `Into<LevelFilter>` impl ([#966])
922- **env-filter**: Fixed `EnvFilter` enabling spans that should not be enabled
923  when multiple subscribers are in use ([#927])
924
925### Changed
926
927- **json**: `format::Json` now outputs fields in a more readable order ([#892])
928- Updated `tracing-core` dependency to 0.1.16
929
930### Added
931
932- **fmt**: Add `BoxMakeWriter` for erasing the type of a `MakeWriter`
933  implementation ([#958])
934- **fmt**: Add `TestWriter` `MakeWriter` implementation to support libtest
935  output capturing ([#938])
936- **layer**: Add `Layer` impl for `Option<T> where T: Layer` ([#910])
937- **env-filter**: Add `From<Level>` impl for `Directive` ([#918])
938- Multiple documentation fixes and improvements
939
940Thanks to @Pothulapati, @samrg472, @bryanburgers, @keetonian, and @SriRamanujam
941for contributing to this release!
942
943[#927]: https://github.com/tokio-rs/tracing/pull/927
944[#966]: https://github.com/tokio-rs/tracing/pull/966
945[#958]: https://github.com/tokio-rs/tracing/pull/958
946[#892]: https://github.com/tokio-rs/tracing/pull/892
947[#938]: https://github.com/tokio-rs/tracing/pull/938
948[#910]: https://github.com/tokio-rs/tracing/pull/910
949[#918]: https://github.com/tokio-rs/tracing/pull/918
950
951# 0.2.11 (August 10, 2020)
952
953### Fixed
954
955- **env-filter**: Incorrect max level hint when filters involving span field
956  values are in use (#907)
957- **registry**: Fixed inconsistent span stacks when multiple registries are in
958  use on the same thread (#901)
959
960### Changed
961
962- **env-filter**: `regex` dependency enables fewer unused feature flags (#899)
963
964Thanks to @bdonlan and @jeromegn for contributing to this release!
965
966# 0.2.10 (July 31, 2020)
967
968### Fixed
969
970- **docs**: Incorrect formatting (#862)
971
972### Changed
973
974- **filter**: `LevelFilter` is now a re-export of the
975  `tracing_core::LevelFilter` type, it can now be used interchangably with the
976  versions in `tracing` and `tracing-core` (#853)
977- **filter**: Significant performance improvements when comparing `LevelFilter`s
978  and `Level`s (#853)
979- Updated the minimum `tracing-core` dependency to 0.1.12 (#853)
980
981### Added
982
983- **filter**: `LevelFilter` and `EnvFilter` now participate in `tracing-core`'s
984  max level hinting, improving performance significantly in some use cases where
985  levels are disabled globally (#853)
986
987# 0.2.9 (July 23, 2020)
988
989### Fixed
990
991- **fmt**: Fixed compilation failure on MSRV when the `chrono` feature is
992  disabled (#844)
993
994### Added
995
996- **fmt**: Span lookup methods defined by `layer::Context` are now also provided
997  by `FmtContext` (#834)
998
999# 0.2.8 (July 17, 2020)
1000
1001### Changed
1002
1003- **fmt**: When the `chrono` dependency is enabled, the `SystemTime` timestamp
1004  formatter now emits human-readable timestamps rather than using `SystemTime`'s
1005  `fmt::Debug`implementation (`chrono` is still required for customized
1006  timestamp formatting) (#807)
1007- **ansi**: Updated `ansi_term` dependency to 0.12 (#816)
1008
1009### Added
1010
1011- **json**: `with_span_list` method to configure the JSON formatter to include a
1012  list of all spans in the current trace in formatting events (similarly to the
1013  text formatter) (#741)
1014- **json**: `with_current_span` method to configure the JSON formatter to include
1015  a field for the _current_ span (the leaf of the trace) in formatted events
1016  (#741)
1017- **fmt**: `with_thread_names` and `with_thread_ids` methods to configure
1018  `fmt::Subscriber`s and `fmt::Layer`s to include the thread name and/or thread ID
1019  of the current thread when formatting events (#818)
1020
1021Thanks to new contributors @mockersf, @keetonian, and @Pothulapati for
1022contributing to this release!
1023
1024# 0.2.7 (July 1, 2020)
1025
1026### Changed
1027
1028- **parking_lot**: Updated the optional `parking_lot` dependency to accept the
1029  latest `parking_lot` version (#774)
1030
1031### Fixed
1032
1033- **fmt**: Fixed events with explicitly overridden parent spans being formatted
1034  as though they were children of the current span (#767)
1035
1036### Added
1037
1038- **fmt**: Added the option to print synthesized events when spans are created,
1039  entered, exited, and closed, including span durations (#761)
1040- Documentation clarification and improvement (#762, #769)
1041
1042Thanks to @rkuhn, @greenwoodcm, and @Ralith for contributing to this release!
1043
1044# 0.2.6 (June 19, 2020)
1045
1046### Fixed
1047
1048- **fmt**: Fixed an issue in the JSON formatter where using `Span::record` would
1049  result in malformed spans (#709)
1050
1051# 0.2.5 (April 21, 2020)
1052
1053### Changed
1054
1055- **fmt**: Bump sharded-slab dependency (#679)
1056
1057### Fixed
1058
1059- **fmt**: remove trailing space in `ChronoUtc` `format_time` (#677)
1060
1061# 0.2.4 (April 6, 2020)
1062
1063This release includes several API ergonomics improvements, including shorthand
1064constructors for many types, and an extension trait for initializing subscribers
1065using method-chaining style. Additionally, several bugs in less commonly used
1066`fmt` APIs were fixed.
1067
1068### Added
1069
1070- **fmt**: Shorthand free functions for constructing most types in `fmt`
1071  (including `tracing_subscriber::fmt()` to return a `SubscriberBuilder`,
1072  `tracing_subscriber::fmt::layer()` to return a format `Layer`, etc) (#660)
1073- **registry**: Shorthand free function `tracing_subscriber::registry()` to
1074  construct a new registry (#660)
1075- Added `SubscriberInitExt` extension trait for more ergonomic subscriber
1076  initialization (#660)
1077
1078### Changed
1079
1080- **fmt**: Moved `LayerBuilder` methods to `Layer` (#655)
1081
1082### Deprecated
1083
1084- **fmt**: `LayerBuilder`, as `Layer` now implements all builder methods (#655)
1085
1086### Fixed
1087
1088- **fmt**: Fixed `Compact` formatter not omitting levels with
1089  `with_level(false)` (#657)
1090- **fmt**: Fixed `fmt::Layer` duplicating the fields for a new span if another
1091  layer has already formatted its fields (#634)
1092- **fmt**: Added missing space when using `record` to add new fields to a span
1093  that already has fields (#659)
1094- Updated outdated documentation (#647)
1095
1096
1097# 0.2.3 (March 5, 2020)
1098
1099### Fixed
1100
1101- **env-filter**: Regression where filter directives were selected in the order
1102  they were listed, rather than most specific first (#624)
1103
1104# 0.2.2 (February 27, 2020)
1105
1106### Added
1107
1108- **fmt**: Added `flatten_event` to `SubscriberBuilder` (#599)
1109- **fmt**: Added `with_level` to `SubscriberBuilder` (#594)
1110
1111# 0.2.1 (February 13, 2020)
1112
1113### Changed
1114
1115- **filter**: `EnvFilter` directive selection now behaves correctly (i.e. like
1116  `env_logger`) (#583)
1117
1118### Fixed
1119
1120- **filter**: Fixed `EnvFilter` incorrectly allowing less-specific filter
1121  directives to enable events that are disabled by more-specific filters (#583)
1122- **filter**: Multiple significant `EnvFilter` performance improvements,
1123  especially when filtering events generated by `log` records (#578, #583)
1124- **filter**: Replaced `BTreeMap` with `Vec` in `DirectiveSet`, improving
1125  iteration performance significantly with typical numbers of filter directives
1126  (#580)
1127
1128A big thank-you to @samschlegel for lots of help with `EnvFilter` performance
1129tuning in this release!
1130
1131# 0.2.0 (February 4, 2020)
1132
1133### Breaking Changes
1134
1135- **fmt**: Renamed `Context` to `FmtContext` (#420, #425)
1136- **fmt**: Renamed `Builder` to `SubscriberBuilder` (#420)
1137- **filter**: Removed `Filter`. Use `EnvFilter` instead (#434)
1138
1139### Added
1140
1141- **registry**: `Registry`, a `Subscriber` implementation that `Layer`s can use
1142  as a high-performance, in-memory span store. (#420, #425, #432, #433, #435)
1143- **registry**: Added `LookupSpan` trait, implemented by `Subscriber`s to expose
1144  stored span data to `Layer`s (#420)
1145- **fmt**: Added `fmt::Layer`, to allow composing log formatting with other `Layer`s
1146- **fmt**: Added support for JSON field and event formatting (#377, #415)
1147- **filter**: Documentation for filtering directives (#554)
1148
1149### Changed
1150
1151- **fmt**: Renamed `Context` to `FmtContext` (#420, #425) (BREAKING)
1152- **fmt**: Renamed `Builder` to `SubscriberBuilder` (#420) (BREAKING)
1153- **fmt**: Reimplemented `fmt::Subscriber` in terms of the `Registry`
1154  and `Layer`s (#420)
1155
1156### Removed
1157
1158- **filter**: Removed `Filter`. Use `EnvFilter` instead (#434) (BREAKING)
1159
1160### Fixed
1161
1162- **fmt**: Fixed memory leaks in the slab used to store per-span data
1163  (3c35048)
1164- **fmt**: `fmt::SubscriberBuilder::init` not setting up `log` compatibility
1165  (#489)
1166- **fmt**: Spans closed by a child span closing not also closing _their_
1167  parents (#514)
1168- **Layer**: Fixed `Layered` subscribers failing to downcast to their own type
1169  (#549)
1170- **Layer**: Fixed `Layer::downcast_ref` returning invalid references (#454)
1171
1172# 0.2.0-alpha.6 (February 3, 2020)
1173
1174### Fixed
1175
1176- **fmt**: Fixed empty `{}` printed after spans with no fields (f079f2d)
1177- **fmt**: Fixed inconsistent formatting when ANSI colors are disabled (506a482)
1178- **fmt**: Fixed mis-aligned levels when ANSI colors are disabled (eba1adb)
1179- Fixed warnings on nightly Rust compilers (#558)
1180
1181# 0.2.0-alpha.5 (January 31, 2020)
1182
1183### Added
1184
1185- **env_filter**: Documentation for filtering directives (#554)
1186- **registry**, **env_filter**: Updated `smallvec` dependency to 0.1 (#543)
1187
1188### Fixed
1189
1190- **registry**: Fixed a memory leak in the slab used to store per-span data
1191  (3c35048)
1192- **Layer**: Fixed `Layered` subscribers failing to downcast to their own type
1193  (#549)
1194- **fmt**: Fixed a panic when multiple layers insert `FormattedFields`
1195  extensions from the same formatter type (1c3bb70)
1196- **fmt**: Fixed `fmt::Layer::on_record` inserting a new `FormattedFields` when
1197  formatted fields for a span already exist (1c3bb70)
1198
1199# 0.2.0-alpha.4 (January 11, 2020)
1200
1201### Fixed
1202
1203- **registry**: Removed inadvertently committed `dbg!` macros (#533)
1204
1205# 0.2.0-alpha.3 (January 10, 2020)
1206
1207### Added
1208
1209- **fmt**: Public `FormattedFields::new` constructor (#478)
1210- **fmt**: Added examples to `fmt::Layer` documentation (#510)
1211- Documentation now shows what feature flags are required by each API item (#525)
1212
1213### Fixed
1214
1215- **fmt**: Missing space between timestamp and level (#480)
1216- **fmt**: Incorrect formatting with `with_target(false)` (#481)
1217- **fmt**: `fmt::SubscriberBuilder::init` not setting up `log` compatibility
1218  (#489)
1219- **registry**: Spans exited out of order not being closed properly on exit
1220  (#509)
1221- **registry**: Memory leak when spans are closed by a child span closing (#514)
1222- **registry**: Spans closed by a child span closing not also closing _their_
1223  parents (#514)
1224- Compilation errors with `no-default-features` (#499, #500)
1225
1226# 0.2.0-alpha.2 (December 8, 2019)
1227
1228### Added
1229
1230- `LookupSpans` implementation for `Layered` (#448)
1231- `SpanRef::from_root` to iterate over a span's parents from the root (#460)
1232- `Context::scope`, to iterate over the current context from the root (#460)
1233- `Context::lookup_current`, which returns a `SpanRef` to the current
1234  span's data (#460)
1235
1236### Changed
1237
1238- Lifetimes on some new `Context` methods to be less restrictive (#460)
1239
1240### Fixed
1241
1242- `Layer::downcast_ref` returning invalid references (#454)
1243- Compilation failure on 32-bit platforms (#462)
1244- Compilation failure with ANSI formatters (#438)
1245
1246# 0.2.0-alpha.1 (November 18, 2019)
1247
1248### Added
1249
1250- `Registry`, a reusable span store that `Layer`s can use a
1251  high-performance, in-memory store. (#420, #425, #432, #433, #435)
1252- Reimplemented `fmt::Subscriber` in terms of the `Registry`
1253  and `Layer`s (#420)
1254- Add benchmarks for fmt subscriber (#421)
1255- Add support for JSON field and event formatting (#377, #415)
1256
1257### Changed
1258
1259- **BREAKING**: Change `fmt::format::FormatFields` and
1260  `fmt::format::FormatEvent` to accept a mandatory `FmtContext`. These
1261  `FormatFields` and `FormatEvent` will likely see additional breaking
1262  changes in subsequent alpha. (#420, #425)
1263- **BREAKING**: Removed `Filter`. Use `EnvFilter` instead (#434)
1264
1265### Contributers
1266
1267Thanks to all the contributers to this release!
1268
1269- @pimeys for #377 and #415
1270
1271# 0.1.6 (October 29, 2019)
1272
1273### Added
1274
1275- Add `init` and `try_init` functions to `FmtSubscriber` (#385)
1276- Add `ChronoUtc` and `ChronoLocal` timers, RFC 3339 support (#387)
1277- Add `tracing::subscriber::set_default` which sets the default
1278  subscriber and returns a drop guard. This drop guard will reset the
1279  dispatch on drop (#388).
1280
1281### Fixed
1282
1283- Fix default level for `EnvFilter`. Setting `RUST_LOG=target`
1284  previously only the `ERROR` level, while it should enable everything.
1285  `tracing-subscriber` now defaults to `TRACE` if no level is specified
1286  (#401)
1287- Fix `tracing-log` feature flag for init + try_init. The feature flag
1288  `tracing_log` was used instead of the correct `tracing-log`. As a
1289  result, both `tracing-log` and `tracing_log` needed to be specified in
1290  order to initialize the global logger. Only `tracing-log` needs to be
1291  specified now (#400).
1292
1293### Contributers
1294
1295Thanks to all the contributers to this release!
1296
1297- @emschwartz for #385, #387, #400 and #401
1298- @bIgBV for #388
1299
1300# 0.1.5 (October 7, 2019)
1301
1302### Fixed
1303
1304- Spans not being closed properly when `FmtSubscriber::current_span` is used
1305  (#371)
1306
1307# 0.1.4 (September 26, 2019)
1308
1309### Fixed
1310
1311- Spans entered twice on the same thread sometimes being completely exited when
1312  the more deeply-nested entry is exited (#361)
1313- Setting `with_ansi(false)` on `FmtSubscriber` not disabling ANSI color
1314  formatting for timestamps (#354)
1315- Incorrect reference counting in `FmtSubscriber` that could cause spans to not
1316  be closed when all references are dropped (#366)
1317
1318# 0.1.3 (September 16, 2019)
1319
1320### Fixed
1321
1322- `Layered` subscribers not properly forwarding calls to `current_span`
1323  (#350)
1324
1325# 0.1.2 (September 12, 2019)
1326
1327### Fixed
1328
1329- `EnvFilter` ignoring directives with targets that are the same number of
1330  characters (#333)
1331- `EnvFilter` failing to properly apply filter directives to events generated
1332  from `log` records by`tracing-log` (#344)
1333
1334### Changed
1335
1336- Renamed `Filter` to `EnvFilter`, deprecated `Filter` (#339)
1337- Renamed "filter" feature flag to "env-filter", deprecated "filter" (#339)
1338- `FmtSubscriber` now defaults to enabling only the `INFO` level and above when
1339  a max level filter or `EnvFilter` is not set (#336)
1340- Made `parking_lot` dependency an opt-in feature flag (#348)
1341
1342### Added
1343
1344- `EnvFilter::add_directive` to add new directives to filters after they are
1345  constructed (#334)
1346- `fmt::Builder::with_max_level` to set a global level filter for a
1347  `FmtSubscriber` without requiring the use of `EnvFilter` (#336)
1348- `Layer` implementation for `LevelFilter` (#336)
1349- `EnvFilter` now implements `fmt::Display` (#329)
1350
1351### Removed
1352
1353- Removed dependency on `crossbeam-util` (#348)
1354
1355# 0.1.1 (September 4, 2019)
1356
1357### Fixed
1358
1359- Potential double panic in `CurrentSpan` (#325)
1360
1361# 0.1.0 (September 3, 2019)
1362
1363- Initial release
1364