Skip to content

Commit 337e2ab

Browse files
committed
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 <[email protected]>
1 parent 90dfcca commit 337e2ab

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

tracing-subscriber/src/util.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use tracing_core::dispatcher::{self, Dispatch};
1414
/// `Subscriber`, may implement `Into<Dispatch>`, and will also receive an
1515
/// implementation of this trait.
1616
///
17-
/// [default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber
18-
/// [trace dispatcher]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html
17+
/// [default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber
18+
/// [trace dispatcher]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html
1919
pub trait SubscriberInitExt
2020
where
2121
Self: Into<Dispatch>,
@@ -27,7 +27,7 @@ where
2727
/// a [`log`] compatibility layer. This allows the subscriber to consume
2828
/// `log::Record`s as though they were `tracing` `Event`s.
2929
///
30-
/// [default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber
30+
/// [default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber
3131
/// [`log`]: https://crates.io/log
3232
fn set_default(self) -> dispatcher::DefaultGuard {
3333
#[cfg(feature = "tracing-log")]
@@ -47,7 +47,7 @@ where
4747
/// been set, or if a `log` logger has already been set (when the
4848
/// "tracing-log" feature is enabled).
4949
///
50-
/// [global default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber
50+
/// [global default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber
5151
/// [`log`]: https://crates.io/log
5252
fn try_init(self) -> Result<(), TryInitError> {
5353
#[cfg(feature = "tracing-log")]
@@ -69,7 +69,7 @@ where
6969
/// or if a `log` logger has already been set (when the "tracing-log"
7070
/// feature is enabled).
7171
///
72-
/// [global default subscriber]: https://docs.rs/tracing/0.1.17/tracing/dispatcher/index.html#setting-the-default-subscriber
72+
/// [global default subscriber]: https://docs.rs/tracing/0.1.18/tracing/dispatcher/index.html#setting-the-default-subscriber
7373
/// [`log`]: https://crates.io/log
7474
fn init(self) {
7575
self.try_init()

tracing/CHANGELOG.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,42 @@
1-
# 0.1.18 (UNRELEASED)
1+
# 0.1.18 (July 31, 2020)
22

33
### Fixed
44

55
- Fixed a bug where `LevelFilter::OFF` (and thus also the `static_max_level_off`
66
feature flag) would enable *all* traces, rather than *none* (#853)
7+
- **log**: Fixed `tracing` macros and `Span`s not checking `log::max_level`
8+
before emitting `log` records (#870)
9+
10+
### Changed
11+
12+
- **macros**: Macros now check the global max level (`LevelFilter::current`)
13+
before the per-callsite cache when determining if a span or event is enabled.
14+
This significantly improves performance in some use cases (#853)
15+
- **macros**: Simplified the code generated by macro expansion significantly,
16+
which may improve compile times and/or `rustc` optimizatation of surrounding
17+
code (#869, #869)
18+
- **macros**: Macros now check the static max level before checking any runtime
19+
filtering, improving performance when a span or event is disabled by a
20+
`static_max_level_XXX` feature flag (#868)
21+
- `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it
22+
can now be used interchangably with the versions in `tracing-core` and
23+
`tracing-subscriber` (#853)
24+
- Significant performance improvements when comparing `LevelFilter`s and
25+
`Level`s (#853)
26+
- Updated the minimum `tracing-core` dependency to 0.1.12 (#853)
27+
28+
### Added
29+
30+
- **macros**: Quoted string literals may now be used as field names, to allow
31+
fields whose names are not valid Rust identifiers (#790)
32+
- **docs**: Several documentation improvements (#850, #857, #841)
33+
- `LevelFilter::current()` function, which returns the highest level that any
34+
subscriber will enable (#853)
35+
- `Subscriber::max_level_hint` optional trait method, for setting the value
36+
returned by `LevelFilter::current()` (#853)
37+
38+
Thanks to new contributors @cuviper, @ethanboxx, @ben0x539, @dignati,
39+
@colelawrence, and @rbtcollins for helping out with this release!
740

841
# 0.1.17 (July 22, 2020)
942

tracing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "tracing"
88
# - README.md
99
# - Update CHANGELOG.md.
1010
# - Create "v0.1.x" git tag
11-
version = "0.1.17"
11+
version = "0.1.18"
1212
authors = ["Eliza Weisman <[email protected]>", "Tokio Contributors <[email protected]>"]
1313
license = "MIT"
1414
readme = "README.md"

tracing/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Application-level tracing for Rust.
1212
[Documentation][docs-url] | [Chat][discord-url]
1313

1414
[crates-badge]: https://img.shields.io/crates/v/tracing.svg
15-
[crates-url]: https://crates.io/crates/tracing/0.1.17
15+
[crates-url]: https://crates.io/crates/tracing/0.1.18
1616
[docs-badge]: https://docs.rs/tracing/badge.svg
17-
[docs-url]: https://docs.rs/tracing/0.1.17
17+
[docs-url]: https://docs.rs/tracing/0.1.18
1818
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
1919
[docs-master-url]: https://tracing-rs.netlify.com/tracing
2020
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
@@ -241,7 +241,7 @@ my_future
241241
is as long as the future's.
242242

243243
The second, and preferred, option is through the
244-
[`#[instrument]`](https://docs.rs/tracing/0.1.17/tracing/attr.instrument.html)
244+
[`#[instrument]`](https://docs.rs/tracing/0.1.18/tracing/attr.instrument.html)
245245
attribute:
246246

247247
```rust
@@ -288,7 +288,7 @@ span.in_scope(|| {
288288
// Dropping the span will close it, indicating that it has ended.
289289
```
290290

291-
The [`#[instrument]`](https://docs.rs/tracing/0.1.17/tracing/attr.instrument.html) attribute macro
291+
The [`#[instrument]`](https://docs.rs/tracing/0.1.18/tracing/attr.instrument.html) attribute macro
292292
can reduce some of this boilerplate:
293293

294294
```rust

tracing/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@
774774
//!
775775
//! ```toml
776776
//! [dependencies]
777-
//! tracing = { version = "0.1.17", default-features = false }
777+
//! tracing = { version = "0.1.18", default-features = false }
778778
//! ```
779779
//!
780780
//! *Compiler support: requires rustc 1.39+*
@@ -818,7 +818,7 @@
818818
//! [flags]: #crate-feature-flags
819819
#![cfg_attr(not(feature = "std"), no_std)]
820820
#![cfg_attr(docsrs, feature(doc_cfg))]
821-
#![doc(html_root_url = "https://docs.rs/tracing/0.1.17")]
821+
#![doc(html_root_url = "https://docs.rs/tracing/0.1.18")]
822822
#![doc(
823823
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo.svg",
824824
issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/"

0 commit comments

Comments
 (0)