diff --git a/README.md b/README.md index b9ad56b717..5faa1f58ac 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.3/tracing_subscriber/fmt/index.html) provides reasonable defaults. +[`fmt` module](https://docs.rs/tracing-subscriber/0.2.4/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. @@ -75,7 +75,7 @@ fn main() { ```toml [dependencies] tracing = "0.1" -tracing-subscriber = "0.2.3" +tracing-subscriber = "0.2.4" ``` 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 0c04002753..57af3d2cde 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -14,7 +14,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.3", features = ["json", "chrono"] } +tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.4", 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/tracing-error/Cargo.toml b/tracing-error/Cargo.toml index c72e4021b7..26f5cd4e15 100644 --- a/tracing-error/Cargo.toml +++ b/tracing-error/Cargo.toml @@ -38,7 +38,7 @@ default = ["traced-error"] traced-error = [] [dependencies] -tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.3", default-features = false, features = ["registry", "fmt"] } +tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.4", default-features = false, features = ["registry", "fmt"] } tracing = { path = "../tracing", version = "0.1.12"} [badges] diff --git a/tracing-error/src/layer.rs b/tracing-error/src/layer.rs index 28c2c14169..9d91c0656c 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.3/tracing_subscriber/layer/trait.Layer.html +/// [`Layer`]: https://docs.rs/tracing-subscriber/0.2.4/tracing_subscriber/layer/trait.Layer.html /// [`SpanTrace`]: ../struct.SpanTrace.html -/// [field formatter]: https://docs.rs/tracing-subscriber/0.2.3/tracing_subscriber/fmt/trait.FormatFields.html -/// [default format]: https://docs.rs/tracing-subscriber/0.2.3/tracing_subscriber/fmt/format/struct.DefaultFields.html +/// [field formatter]: https://docs.rs/tracing-subscriber/0.2.4/tracing_subscriber/fmt/trait.FormatFields.html +/// [default format]: https://docs.rs/tracing-subscriber/0.2.4/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.3/tracing_subscriber/fmt/trait.FormatFields.html + /// [field formatter]: https://docs.rs/tracing-subscriber/0.2.4/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 6b297ecb70..2b8b2d6fb6 100644 --- a/tracing-subscriber/CHANGELOG.md +++ b/tracing-subscriber/CHANGELOG.md @@ -1,3 +1,39 @@ +# 0.2.4 (April 6, 2020) + +This release includes several API ergonomics improvements, including shorthand +constructors for many types, and an extension trait for initializing subscribers +using method-chaining style. Additionally, several bugs in less commonly used +`fmt` APIs were fixed. + +### Added + +- **fmt**: Shorthand free functions for constructing most types in `fmt` + (including `tracing_subscriber::fmt()` to return a `SubscriberBuilder`, + `tracing_subscriber::fmt::layer()` to return a format `Layer`, etc) (#660) +- **registry**: Shorthand free function `tracing_subscriber::registry()` to + construct a new registry (#660) +- Added `SubscriberInitExt` extension trait for more ergonomic subscriber + initialization (#660) + +### Changed + +- **fmt**: Moved `LayerBuilder` methods to `Layer` (#655) + +### Deprecated + +- **fmt**: `LayerBuilder`, as `Layer` now implements all builder methods (#655) + +### Fixed + +- **fmt**: Fixed `Compact` formatter not omitting levels with + `with_level(false)` (#657) +- **fmt**: Fixed `fmt::Layer` duplicating the fields for a new span if another + layer has already formatted its fields (#634) +- **fmt**: Added missing space when using `record` to add new fields to a span + that already has fields (#659) +- Updated outdated documentation (#647) + + # 0.2.3 (March 5, 2020) ### Fixed diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index 7d00844dbb..1f9808b905 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-subscriber" -version = "0.2.3" +version = "0.2.4" authors = [ "Eliza Weisman ", "David Barsky ", diff --git a/tracing-subscriber/README.md b/tracing-subscriber/README.md index de46f6e143..7d23f30a5e 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.3 +[docs-url]: https://docs.rs/tracing-subscriber/0.2.4 [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 72deec0f60..e26eed72f3 100644 --- a/tracing-subscriber/src/lib.rs +++ b/tracing-subscriber/src/lib.rs @@ -49,7 +49,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.3")] +#![doc(html_root_url = "https://docs.rs/tracing-subscriber/0.2.4")] #![cfg_attr(docsrs, feature(doc_cfg))] #![warn( missing_debug_implementations,