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