From 7e72ce3eb999eecf40f63702616f02791c441d0a Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 13 Feb 2020 16:59:17 -0800 Subject: [PATCH] subscriber: prepare to release 0.2.1 Changed - **filter**: `EnvFilter` directive selection now behaves correctly (i.e. like `env_logger`) (#583) Fixed - **filter**: Fixed `EnvFilter` incorrectly allowing less-specific filter directives to enable events that are disabled by more-specific filters (#583) - **filter**: Multiple significant `EnvFilter` performance improvements, especially when filtering events generated by `log` records (#578, #583) - **filter**: Replaced `BTreeMap` with `Vec` in `DirectiveSet`, improving iteration performance significantly with typical numbers of filter directives (#580) Signed-off-by: Eliza Weisman --- README.md | 4 ++-- examples/Cargo.toml | 2 +- nightly-examples/Cargo.toml | 2 +- tracing-error/Cargo.toml | 4 ++-- tracing-error/src/layer.rs | 8 ++++---- tracing-subscriber/CHANGELOG.md | 20 ++++++++++++++++++++ tracing-subscriber/Cargo.toml | 2 +- tracing-subscriber/README.md | 2 +- tracing-subscriber/src/lib.rs | 2 +- 9 files changed, 33 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 895c888110..475473511f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ idiomatic `tracing`.) In order to record trace events, executables have to use a `Subscriber` implementation compatible with `tracing`. A `Subscriber` implements a way of collecting trace data, such as by logging it to standard output. [`tracing_subscriber`](https://docs.rs/tracing-subscriber/)'s -[`fmt` module](https://docs.rs/tracing-subscriber/0.2.0-alpha.2/tracing_subscriber/fmt/index.html) provides reasonable defaults. +[`fmt` module](https://docs.rs/tracing-subscriber/0.2.1/tracing_subscriber/fmt/index.html) provides reasonable defaults. Additionally, `tracing-subscriber` is able to consume messages emitted by `log`-instrumented libraries and modules. The simplest way to use a subscriber is to call the `set_global_default` function. @@ -78,7 +78,7 @@ fn main() { ```toml [dependencies] tracing = "0.1" -tracing-subscriber = "0.2.0" +tracing-subscriber = "0.2.1" ``` This subscriber will be used as the default in all threads for the remainder of the duration diff --git a/examples/Cargo.toml b/examples/Cargo.toml index eec18c532f..fd5c786bf0 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -19,7 +19,7 @@ tracing = { path = "../tracing", version = "0.1"} tracing-core = { path = "../tracing-core", version = "0.1"} tracing-error = { path = "../tracing-error" } tracing-tower = { version = "0.1.0", path = "../tracing-tower" } -tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.0", features = ["json", "chrono"] } +tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.1", features = ["json", "chrono"] } tracing-futures = { version = "0.2.1", path = "../tracing-futures", features = ["futures-01"] } tracing-attributes = { path = "../tracing-attributes", version = "0.1.2"} tracing-log = { path = "../tracing-log", version = "0.1.1", features = ["env_logger"] } diff --git a/nightly-examples/Cargo.toml b/nightly-examples/Cargo.toml index a36d39b26e..d98fa5c3f9 100644 --- a/nightly-examples/Cargo.toml +++ b/nightly-examples/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" [dev-dependencies] tracing = { path = "../tracing", version = "0.1"} -tracing-subscriber = { version = "0.2.0-alpha.1", path = "../tracing-subscriber", features = ["json"] } +tracing-subscriber = { version = "0.2.1-alpha.1", path = "../tracing-subscriber", features = ["json"] } tracing-futures = { path = "../tracing-futures", default-features = false, features = ["std-future"] } futures = "0.3" tokio = { version = "0.2", features = ["full"] } diff --git a/tracing-error/Cargo.toml b/tracing-error/Cargo.toml index dfbfcf1000..a883d46bb0 100644 --- a/tracing-error/Cargo.toml +++ b/tracing-error/Cargo.toml @@ -34,7 +34,7 @@ keywords = [ edition = "2018" [dependencies] -tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.0", default-features = false, features = ["registry", "fmt"] } +tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.1", default-features = false, features = ["registry", "fmt"] } tracing = { path = "../tracing", version = "0.1"} [badges] @@ -42,4 +42,4 @@ maintenance = { status = "experimental" } [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] \ No newline at end of file +rustdoc-args = ["--cfg", "docsrs"] diff --git a/tracing-error/src/layer.rs b/tracing-error/src/layer.rs index 6a98e560fd..56d21afacd 100644 --- a/tracing-error/src/layer.rs +++ b/tracing-error/src/layer.rs @@ -15,10 +15,10 @@ use tracing_subscriber::{ /// when formatting the fields of each span in a trace. When no formatter is /// provided, the [default format] is used instead. /// -/// [`Layer`]: https://docs.rs/tracing-subscriber/0.2.0/tracing_subscriber/layer/trait.Layer.html +/// [`Layer`]: https://docs.rs/tracing-subscriber/0.2.1/tracing_subscriber/layer/trait.Layer.html /// [`SpanTrace`]: ../struct.SpanTrace.html -/// [field formatter]: https://docs.rs/tracing-subscriber/0.2.0/tracing_subscriber/fmt/trait.FormatFields.html -/// [default format]: https://docs.rs/tracing-subscriber/0.2.0/tracing_subscriber/fmt/format/struct.DefaultFields.html +/// [field formatter]: https://docs.rs/tracing-subscriber/0.2.1/tracing_subscriber/fmt/trait.FormatFields.html +/// [default format]: https://docs.rs/tracing-subscriber/0.2.1/tracing_subscriber/fmt/format/struct.DefaultFields.html pub struct ErrorLayer { format: F, @@ -70,7 +70,7 @@ where { /// Returns a new `ErrorLayer` with the provided [field formatter]. /// - /// [field formatter]: https://docs.rs/tracing-subscriber/0.2.0/tracing_subscriber/fmt/trait.FormatFields.html + /// [field formatter]: https://docs.rs/tracing-subscriber/0.2.1/tracing_subscriber/fmt/trait.FormatFields.html pub fn new(format: F) -> Self { Self { format, diff --git a/tracing-subscriber/CHANGELOG.md b/tracing-subscriber/CHANGELOG.md index ab9e280234..75f140a4c6 100644 --- a/tracing-subscriber/CHANGELOG.md +++ b/tracing-subscriber/CHANGELOG.md @@ -1,3 +1,23 @@ +# 0.2.1 (February 13, 2020) + +### Changed + +- **filter**: `EnvFilter` directive selection now behaves correctly (i.e. like + `env_logger`) (#583) + +### Fixed + +- **filter**: Fixed `EnvFilter` incorrectly allowing less-specific filter + directives to enable events that are disabled by more-specific filters (#583) +- **filter**: Multiple significant `EnvFilter` performance improvements, + especially when filtering events generated by `log` records (#578, #583) +- **filter**: Replaced `BTreeMap` with `Vec` in `DirectiveSet`, improving + iteration performance significantly with typical numbers of filter directives + (#580) + +A big thank-you to @samschlegel for lots of help with `EnvFilter` performance +tuning in this release! + # 0.2.0 (February 4, 2020) ### Breaking Changes diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index fd4c926cad..007dbe248c 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-subscriber" -version = "0.2.0" +version = "0.2.1" authors = [ "Eliza Weisman ", "David Barsky ", diff --git a/tracing-subscriber/README.md b/tracing-subscriber/README.md index 38c49609cf..c8a35fede2 100644 --- a/tracing-subscriber/README.md +++ b/tracing-subscriber/README.md @@ -17,7 +17,7 @@ Utilities for implementing and composing [`tracing`][tracing] subscribers. [crates-badge]: https://img.shields.io/crates/v/tracing-subscriber.svg [crates-url]: https://crates.io/crates/tracing-subscriber [docs-badge]: https://docs.rs/tracing-subscriber/badge.svg -[docs-url]: https://docs.rs/tracing-subscriber/0.2.0 +[docs-url]: https://docs.rs/tracing-subscriber/0.2.1 [docs-master-badge]: https://img.shields.io/badge/docs-master-blue [docs-master-url]: https://tracing-rs.netlify.com/tracing_subscriber [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg diff --git a/tracing-subscriber/src/lib.rs b/tracing-subscriber/src/lib.rs index 4a1386167d..24ff6e5d86 100644 --- a/tracing-subscriber/src/lib.rs +++ b/tracing-subscriber/src/lib.rs @@ -51,7 +51,7 @@ //! [`env_logger` crate]: https://crates.io/crates/env_logger //! [`parking_lot`]: https://crates.io/crates/parking_lot //! [`registry`]: registry/index.html -#![doc(html_root_url = "https://docs.rs/tracing-subscriber/0.2.0")] +#![doc(html_root_url = "https://docs.rs/tracing-subscriber/0.2.1")] #![cfg_attr(docsrs, feature(doc_cfg))] #![warn( missing_debug_implementations,