From 337e2ab582020c92aaf3fa0de691f5b39d09be0e Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Fri, 31 Jul 2020 11:33:35 -0700 Subject: [PATCH] tracing: prepare to release 0.1.18 Fixed - Fixed a bug where `LevelFilter::OFF` (and thus also the `static_max_level_off` feature flag) would enable *all* traces, rather than *none* (#853) - **log**: Fixed `tracing` macros and `Span`s not checking `log::max_level` before emitting `log` records (#870) Changed - **macros**: Macros now check the global max level (`LevelFilter::current`) before the per-callsite cache when determining if a span or event is enabled. This significantly improves performance in some use cases (#853) - **macros**: Simplified the code generated by macro expansion significantly, which may improve compile times and/or `rustc` optimizatation of surrounding code (#869, #869) - **macros**: Macros now check the static max level before checking any runtime filtering, improving performance when a span or event is disabled by a `static_max_level_XXX` feature flag (#868) - `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it can now be used interchangably with the versions in `tracing-core` and `tracing-subscriber` (#853) - Significant performance improvements when comparing `LevelFilter`s and `Level`s (#853) - Updated the minimum `tracing-core` dependency to 0.1.12 (#853) Added - **macros**: Quoted string literals may now be used as field names, to allow fields whose names are not valid Rust identifiers (#790) - **docs**: Several documentation improvements (#850, #857, #841) - `LevelFilter::current()` function, which returns the highest level that any subscriber will enable (#853) - `Subscriber::max_level_hint` optional trait method, for setting the value returned by `LevelFilter::current()` (#853) Thanks to new contributors @cuviper, @ethanboxx, @ben0x539, @dignati, @colelawrence, and @rbtcollins for helping out with this release! Signed-off-by: Eliza Weisman --- tracing-subscriber/src/util.rs | 10 +++++----- tracing/CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++- tracing/Cargo.toml | 2 +- tracing/README.md | 8 ++++---- tracing/src/lib.rs | 4 ++-- 5 files changed, 46 insertions(+), 13 deletions(-) diff --git a/tracing-subscriber/src/util.rs b/tracing-subscriber/src/util.rs index aba3d30608..cf3f922c10 100644 --- a/tracing-subscriber/src/util.rs +++ b/tracing-subscriber/src/util.rs @@ -14,8 +14,8 @@ use tracing_core::dispatcher::{self, Dispatch}; /// `Subscriber`, may implement `Into`, and will also receive an /// implementation of this trait. /// -/// [default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber -/// [trace dispatcher]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html +/// [default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber +/// [trace dispatcher]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html pub trait SubscriberInitExt where Self: Into, @@ -27,7 +27,7 @@ where /// a [`log`] compatibility layer. This allows the subscriber to consume /// `log::Record`s as though they were `tracing` `Event`s. /// - /// [default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber + /// [default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber /// [`log`]: https://crates.io/log fn set_default(self) -> dispatcher::DefaultGuard { #[cfg(feature = "tracing-log")] @@ -47,7 +47,7 @@ where /// been set, or if a `log` logger has already been set (when the /// "tracing-log" feature is enabled). /// - /// [global default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber + /// [global default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber /// [`log`]: https://crates.io/log fn try_init(self) -> Result<(), TryInitError> { #[cfg(feature = "tracing-log")] @@ -69,7 +69,7 @@ where /// or if a `log` logger has already been set (when the "tracing-log" /// feature is enabled). /// - /// [global default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber + /// [global default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber /// [`log`]: https://crates.io/log fn init(self) { self.try_init() diff --git a/tracing/CHANGELOG.md b/tracing/CHANGELOG.md index fa8b91c794..7fb853f93d 100644 --- a/tracing/CHANGELOG.md +++ b/tracing/CHANGELOG.md @@ -1,9 +1,42 @@ -# 0.1.18 (UNRELEASED) +# 0.1.18 (July 31, 2020) ### Fixed - Fixed a bug where `LevelFilter::OFF` (and thus also the `static_max_level_off` feature flag) would enable *all* traces, rather than *none* (#853) +- **log**: Fixed `tracing` macros and `Span`s not checking `log::max_level` + before emitting `log` records (#870) + +### Changed + +- **macros**: Macros now check the global max level (`LevelFilter::current`) + before the per-callsite cache when determining if a span or event is enabled. + This significantly improves performance in some use cases (#853) +- **macros**: Simplified the code generated by macro expansion significantly, + which may improve compile times and/or `rustc` optimizatation of surrounding + code (#869, #869) +- **macros**: Macros now check the static max level before checking any runtime + filtering, improving performance when a span or event is disabled by a + `static_max_level_XXX` feature flag (#868) +- `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it + can now be used interchangably with the versions in `tracing-core` and + `tracing-subscriber` (#853) +- Significant performance improvements when comparing `LevelFilter`s and + `Level`s (#853) +- Updated the minimum `tracing-core` dependency to 0.1.12 (#853) + +### Added + +- **macros**: Quoted string literals may now be used as field names, to allow + fields whose names are not valid Rust identifiers (#790) +- **docs**: Several documentation improvements (#850, #857, #841) +- `LevelFilter::current()` function, which returns the highest level that any + subscriber will enable (#853) +- `Subscriber::max_level_hint` optional trait method, for setting the value + returned by `LevelFilter::current()` (#853) + +Thanks to new contributors @cuviper, @ethanboxx, @ben0x539, @dignati, +@colelawrence, and @rbtcollins for helping out with this release! # 0.1.17 (July 22, 2020) diff --git a/tracing/Cargo.toml b/tracing/Cargo.toml index 0569d2acc7..3a9f7553da 100644 --- a/tracing/Cargo.toml +++ b/tracing/Cargo.toml @@ -8,7 +8,7 @@ name = "tracing" # - README.md # - Update CHANGELOG.md. # - Create "v0.1.x" git tag -version = "0.1.17" +version = "0.1.18" authors = ["Eliza Weisman ", "Tokio Contributors "] license = "MIT" readme = "README.md" diff --git a/tracing/README.md b/tracing/README.md index d4695bf931..8add838da1 100644 --- a/tracing/README.md +++ b/tracing/README.md @@ -12,9 +12,9 @@ Application-level tracing for Rust. [Documentation][docs-url] | [Chat][discord-url] [crates-badge]: https://img.shields.io/crates/v/tracing.svg -[crates-url]: https://crates.io/crates/tracing/0.1.17 +[crates-url]: https://crates.io/crates/tracing/0.1.18 [docs-badge]: https://docs.rs/tracing/badge.svg -[docs-url]: https://docs.rs/tracing/0.1.17 +[docs-url]: https://docs.rs/tracing/0.1.18 [docs-master-badge]: https://img.shields.io/badge/docs-master-blue [docs-master-url]: https://tracing-rs.netlify.com/tracing [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg @@ -241,7 +241,7 @@ my_future is as long as the future's. The second, and preferred, option is through the -[`#[instrument]`](https://docs.rs/tracing/0.1.17/tracing/attr.instrument.html) +[`#[instrument]`](https://docs.rs/tracing/0.1.18/tracing/attr.instrument.html) attribute: ```rust @@ -288,7 +288,7 @@ span.in_scope(|| { // Dropping the span will close it, indicating that it has ended. ``` -The [`#[instrument]`](https://docs.rs/tracing/0.1.17/tracing/attr.instrument.html) attribute macro +The [`#[instrument]`](https://docs.rs/tracing/0.1.18/tracing/attr.instrument.html) attribute macro can reduce some of this boilerplate: ```rust diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index c686a5491c..d5ff000df9 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -774,7 +774,7 @@ //! //! ```toml //! [dependencies] -//! tracing = { version = "0.1.17", default-features = false } +//! tracing = { version = "0.1.18", default-features = false } //! ``` //! //! *Compiler support: requires rustc 1.39+* @@ -818,7 +818,7 @@ //! [flags]: #crate-feature-flags #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(docsrs, feature(doc_cfg))] -#![doc(html_root_url = "https://docs.rs/tracing/0.1.17")] +#![doc(html_root_url = "https://docs.rs/tracing/0.1.18")] #![doc( html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo.svg", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/"