Skip to content

Commit 4e56741

Browse files
authored
subscriber: prepare to release v0.3.0 (#1677)
# 0.3.0 (Oct 22, 2021) This is a breaking release of `tracing-subscriber`. The primary breaking change in this release is the removal of the dependency on the [`chrono` crate], due to [RUSTSEC-2020-0159]. To replace `chrono`, support is added for formatting timestamps using the [`time` crate] instead. In addition, this release includes a number of other breaking API changes, such as adding (limited) support for `#![no_std]` targets, removing previously deprecated APIs, and more. ### Breaking Changes - Removed APIs deprecated in the v0.2.x release series. - Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674]) - Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn Layer<S> + ...>` ([#1649]) - Replaced the [`chrono` crate] with the [`time` crate] for timestamp formatting, to resolve [RUSTSEC-2020-0159] ([#1646]) - Removed `json` and `env-filter` from default features. They must now be enabled explictly ([#1647]) - Changed `FormatEvent::format_event` and `FormatFields::format_fields` trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write` trait object ([#1661]) - Changed the signature of the `MakeWriter` trait by adding a lifetime parameter ([#781]) ### Changed - **layer**: Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674]) - **fmt**: Changed `FormatEvent::format_event` and `FormatFields::format_fields` trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write` trait object ([#1661]) - **json**, **env-filter**: `json` and `env-filter` feature flags are no longer enabled by default ([#1647]) ### Removed - Removed deprecated `CurrentSpan` type ([#1320]) - **registry**: Removed deprecated `SpanRef::parents` iterator, replaced by `SpanRef::scope` in [#1431] ([#1648)]) - **layer**: Removed deprecated `Context::scope` iterator, replaced by `Context::span_scope` and `Context::event_scope` in [#1431] and [#1434] ([#1648)]) - **layer**: Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn Layer<S> + ...>`. These interfere with per-layer filtering. ([#1649]) - **fmt**: Removed deprecated `LayerBuilder` type ([#1673]) - **fmt**: Removed `fmt::Layer::on_event` (renamed to `fmt::Layer::fmt_event`) ([#1673]) - **fmt**, **chrono**: Removed the `chrono` feature flag and APIs for using the [`chrono` crate] for timestamp formatting ([#1646]) ### Added - **fmt**, **time**: `LocalTime` and `UtcTime` types for formatting timestamps using the [`time` crate] ([#1646]) - **fmt**: Added a lifetime parameter to the `MakeWriter` trait, allowing it to return a borrowed writer. This enables implementations of `MakeWriter` for types such as `Mutex<T: io::Write>` and `std::fs::File`. ([#781]) - **env-filter**: Documentation improvements ([#1637]) - Support for some APIs on `#![no_std]` targets, by disabling the `std` feature flag ([#1660]) Thanks to @Folyd and @nmathewson for contributing to this release! [#1320]: #1320 [#1673]: #1673 [#1674]: #1674 [#1646]: #1646 [#1647]: #1647 [#1648]: #1648 [#1649]: #1649 [#1660]: #1660 [#1661]: #1661 [#1431]: #1431 [#1434]: #1434 [#781]: #781 [`chrono` crate]: https://crates.io/crates/chrono [`time` crate]: https://crates.io/crates/time [RUSTSEC-2020-0159]: https://rustsec.org/advisories/RUSTSEC-2020-0159.html Signed-off-by: Eliza Weisman <[email protected]>
1 parent f461c5b commit 4e56741

File tree

13 files changed

+93
-14
lines changed

13 files changed

+93
-14
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To use `tracing-subscriber`, add the following to your `Cargo.toml`:
4848
```toml
4949
[dependencies]
5050
tracing = "0.1"
51-
tracing-subscriber = "0.2"
51+
tracing-subscriber = "0.3"
5252
```
5353

5454
Then create and install a `Subscriber`, for example using [`init()`]:

Diff for: examples/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tracing-core = { path = "../tracing-core", version = "0.1" }
1515
tracing-error = { path = "../tracing-error" }
1616
tracing-flame = { path = "../tracing-flame" }
1717
tracing-tower = { version = "0.1.0", path = "../tracing-tower" }
18-
tracing-subscriber = { path = "../tracing-subscriber", version = "0.2", features = ["json", "env-filter"] }
18+
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", features = ["json", "env-filter"] }
1919
tracing-futures = { version = "0.2.1", path = "../tracing-futures", features = ["futures-01"] }
2020
tracing-attributes = { path = "../tracing-attributes", version = "0.1.2" }
2121
tracing-log = { path = "../tracing-log", version = "0.1.1", features = ["env_logger"] }

Diff for: tracing-appender/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ time = { version = "0.3", default-features = false, features = ["formatting"] }
2525

2626
[dependencies.tracing-subscriber]
2727
path = "../tracing-subscriber"
28-
version = "0.2.7"
28+
version = "0.3"
2929
default-features = false
3030
features = ["fmt", "std"]
3131

Diff for: tracing-error/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ default = ["traced-error"]
3838
traced-error = []
3939

4040
[dependencies]
41-
tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.19", default-features = false, features = ["registry", "fmt"] }
41+
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "fmt"] }
4242
tracing = { path = "../tracing", version = "0.1.12", default-features = false, features = ["std"] }
4343

4444
[badges]

Diff for: tracing-error/src/layer.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ use tracing_subscriber::{
1515
/// when formatting the fields of each span in a trace. When no formatter is
1616
/// provided, the [default format] is used instead.
1717
///
18-
/// [`Layer`]: https://docs.rs/tracing-subscriber/0.2.10/tracing_subscriber/layer/trait.Layer.html
18+
/// [`Layer`]: https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/layer/trait.Layer.html
1919
/// [`SpanTrace`]: ../struct.SpanTrace.html
20-
/// [field formatter]: https://docs.rs/tracing-subscriber/0.2.10/tracing_subscriber/fmt/trait.FormatFields.html
21-
/// [default format]: https://docs.rs/tracing-subscriber/0.2.10/tracing_subscriber/fmt/format/struct.DefaultFields.html
20+
/// [field formatter]: https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/fmt/trait.FormatFields.html
21+
/// [default format]: https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/fmt/format/struct.DefaultFields.html
2222
pub struct ErrorLayer<S, F = DefaultFields> {
2323
format: F,
2424

Diff for: tracing-flame/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ default = ["smallvec"]
2525
smallvec = ["tracing-subscriber/smallvec"]
2626

2727
[dependencies]
28-
tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.19", default-features = false, features = ["registry", "fmt"] }
28+
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "fmt"] }
2929
tracing = { path = "../tracing", version = "0.1.12", default-features = false, features = ["std"] }
3030
lazy_static = "1.3.0"
3131

Diff for: tracing-journald/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ keywords = ["tracing", "journald"]
1616

1717
[dependencies]
1818
tracing-core = { path = "../tracing-core", version = "0.1.10" }
19-
tracing-subscriber = { path = "../tracing-subscriber", version = "0.2.19" }
19+
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3" }

Diff for: tracing-opentelemetry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ default = ["tracing-log"]
2525
opentelemetry = { version = "0.16", default-features = false, features = ["trace"] }
2626
tracing = { path = "../tracing", version = "0.1", default-features = false, features = ["std"] }
2727
tracing-core = { path = "../tracing-core", version = "0.1" }
28-
tracing-subscriber = { path = "../tracing-subscriber", version = "0.2", default-features = false, features = ["registry", "std"] }
28+
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "std"] }
2929
tracing-log = { path = "../tracing-log", version = "0.1", default-features = false, optional = true }
3030

3131
[dev-dependencies]

Diff for: tracing-subscriber/CHANGELOG.md

+79
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,82 @@
1+
# 0.3.0 (Oct 22, 2021)
2+
3+
This is a breaking release of `tracing-subscriber`. The primary breaking change
4+
in this release is the removal of the dependency on the [`chrono` crate], due to
5+
[RUSTSEC-2020-0159]. To replace `chrono`, support is added for formatting
6+
timestamps using the [`time` crate] instead.
7+
8+
In addition, this release includes a number of other breaking API changes, such
9+
as adding (limited) support for `#![no_std]` targets, removing previously
10+
deprecated APIs, and more.
11+
12+
### Breaking Changes
13+
14+
- Removed APIs deprecated in the v0.2.x release series.
15+
- Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
16+
- Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn Layer<S> + ...>`
17+
([#1649])
18+
- Replaced the [`chrono` crate] with the [`time` crate] for timestamp formatting, to
19+
resolve [RUSTSEC-2020-0159] ([#1646])
20+
- Removed `json` and `env-filter` from default features. They must now be
21+
enabled explictly ([#1647])
22+
- Changed `FormatEvent::format_event` and `FormatFields::format_fields`
23+
trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write`
24+
trait object ([#1661])
25+
- Changed the signature of the `MakeWriter` trait by adding a lifetime parameter
26+
([#781])
27+
### Changed
28+
29+
- **layer**: Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
30+
- **fmt**: Changed `FormatEvent::format_event` and `FormatFields::format_fields`
31+
trait methods to take a `Writer` type, rather than a `&mut dyn fmt::Write`
32+
trait object ([#1661])
33+
- **json**, **env-filter**: `json` and `env-filter` feature flags are no longer
34+
enabled by default ([#1647])
35+
### Removed
36+
37+
- Removed deprecated `CurrentSpan` type ([#1320])
38+
- **registry**: Removed deprecated `SpanRef::parents` iterator, replaced by
39+
`SpanRef::scope` in [#1431] ([#1648)])
40+
- **layer**: Removed deprecated `Context::scope` iterator, replaced by
41+
`Context::span_scope` and `Context::event_scope` in [#1431] and [#1434]
42+
([#1648)])
43+
- **layer**: Removed `Layer` impl for `Arc<L: Layer<S>>` and
44+
`Arc<dyn Layer<S> + ...>`. These interfere with per-layer filtering. ([#1649])
45+
- **fmt**: Removed deprecated `LayerBuilder` type ([#1673])
46+
- **fmt**: Removed `fmt::Layer::on_event` (renamed to `fmt::Layer::fmt_event`)
47+
([#1673])
48+
- **fmt**, **chrono**: Removed the `chrono` feature flag and APIs for using the
49+
[`chrono` crate] for timestamp formatting ([#1646])
50+
### Added
51+
52+
- **fmt**, **time**: `LocalTime` and `UtcTime` types for formatting timestamps
53+
using the [`time` crate] ([#1646])
54+
- **fmt**: Added a lifetime parameter to the `MakeWriter` trait, allowing it to
55+
return a borrowed writer. This enables implementations of `MakeWriter` for
56+
types such as `Mutex<T: io::Write>` and `std::fs::File`. ([#781])
57+
- **env-filter**: Documentation improvements ([#1637])
58+
- Support for some APIs on `#![no_std]` targets, by disabling the `std` feature
59+
flag ([#1660])
60+
61+
Thanks to @Folyd and @nmathewson for contributing to this release!
62+
63+
[#1320]: https://github.com/tokio-rs/tracing/pull/1320
64+
[#1673]: https://github.com/tokio-rs/tracing/pull/1673
65+
[#1674]: https://github.com/tokio-rs/tracing/pull/1674
66+
[#1646]: https://github.com/tokio-rs/tracing/pull/1646
67+
[#1647]: https://github.com/tokio-rs/tracing/pull/1647
68+
[#1648]: https://github.com/tokio-rs/tracing/pull/1648
69+
[#1649]: https://github.com/tokio-rs/tracing/pull/1649
70+
[#1660]: https://github.com/tokio-rs/tracing/pull/1660
71+
[#1661]: https://github.com/tokio-rs/tracing/pull/1661
72+
[#1431]: https://github.com/tokio-rs/tracing/pull/1431
73+
[#1434]: https://github.com/tokio-rs/tracing/pull/1434
74+
[#781]: https://github.com/tokio-rs/tracing/pull/781
75+
76+
[`chrono` crate]: https://crates.io/crates/chrono
77+
[`time` crate]: https://crates.io/crates/time
78+
[RUSTSEC-2020-0159]: https://rustsec.org/advisories/RUSTSEC-2020-0159.html
79+
180
# 0.2.25 (October 5, 2021)
281

382
This release fixes an issue where a `Layer` implementation's custom

Diff for: tracing-subscriber/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tracing-subscriber"
3-
version = "0.2.25"
3+
version = "0.3.0"
44
authors = [
55
"Eliza Weisman <[email protected]>",
66
"David Barsky <[email protected]>",

Diff for: tracing-subscriber/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Utilities for implementing and composing [`tracing`][tracing] subscribers.
2121
[crates-badge]: https://img.shields.io/crates/v/tracing-subscriber.svg
2222
[crates-url]: https://crates.io/crates/tracing-subscriber
2323
[docs-badge]: https://docs.rs/tracing-subscriber/badge.svg
24-
[docs-url]: https://docs.rs/tracing-subscriber/0.2.25
24+
[docs-url]: https://docs.rs/tracing-subscriber/0.3.0
2525
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
2626
[docs-master-url]: https://tracing-rs.netlify.com/tracing_subscriber
2727
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg

Diff for: tracing-subscriber/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
//! [`parking_lot`]: https://crates.io/crates/parking_lot
127127
//! [`time` crate]: https://crates.io/crates/time
128128
//! [`liballoc`]: https://doc.rust-lang.org/alloc/index.html
129-
#![doc(html_root_url = "https://docs.rs/tracing-subscriber/0.2.25")]
129+
#![doc(html_root_url = "https://docs.rs/tracing-subscriber/0.3.0")]
130130
#![doc(
131131
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png",
132132
issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/"

Diff for: tracing/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ idiomatic `tracing`.)
6262
In order to record trace events, executables have to use a `Subscriber`
6363
implementation compatible with `tracing`. A `Subscriber` implements a way of
6464
collecting trace data, such as by logging it to standard output. [`tracing_subscriber`](https://docs.rs/tracing-subscriber/)'s
65-
[`fmt` module](https://docs.rs/tracing-subscriber/0.2.0-alpha.2/tracing_subscriber/fmt/index.html) provides reasonable defaults.
65+
[`fmt` module](https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/fmt/index.html) provides reasonable defaults.
6666
Additionally, `tracing-subscriber` is able to consume messages emitted by `log`-instrumented libraries and modules.
6767

6868
The simplest way to use a subscriber is to call the `set_global_default` function.

0 commit comments

Comments
 (0)