Skip to content

Commit 34ec7af

Browse files
hawkwkaffarell
authored andcommitted
attributes: prepare to release v0.1.24 (tokio-rs#2574)
# 0.1.24 (April 24th, 2023) This release of `tracing-attributes` adds support for passing an optional `level` to the `err` and `ret` arguments to `#[instrument]`, allowing the level of the generated return-value event to be overridden. For example, ```rust #[instrument(err(level = "info"))] fn my_great_function() -> Result<(), &'static str> { // ... } ``` will emit an `INFO`-level event if the function returns an `Err`. In addition, this release updates the [`syn`] dependency to v2.x.x. ### Added - `level` argument to `err` and `ret` to override the level of the generated return value event (tokio-rs#2335) - Improved compiler error message when `#[instrument]` is added to a `const fn` (tokio-rs#2418) ### Changed - Updated `syn` dependency to 2.0 (tokio-rs#2516) ### Fixed - Fix `clippy::unreachable` warnings in `#[instrument]`-generated code (tokio-rs#2356) - Removed unused "visit" feature flag from `syn` dependency (tokio-rs#2530) ### Documented - Documented default level for `err` (tokio-rs#2433) - Improved documentation for levels in `#[instrument]` (tokio-rs#2350) Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack, @quad, @klensy, @davidpdrsn, and @dbidwell94 for contributign to this release! [`syn`]: https://crates.io/crates/syn
1 parent d27d4f1 commit 34ec7af

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

tracing-attributes/CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
1+
# 0.1.24 (April 24th, 2023)
2+
3+
This release of `tracing-attributes` adds support for passing an optional
4+
`level` to the `err` and `ret` arguments to `#[instrument]`, allowing the level
5+
of the generated return-value event to be overridden. For example,
6+
7+
```rust
8+
#[instrument(err(level = "info"))]
9+
fn my_great_function() -> Result<(), &'static str> {
10+
// ...
11+
}
12+
```
13+
14+
will emit an `INFO`-level event if the function returns an `Err`.
15+
16+
In addition, this release updates the [`syn`] dependency to v2.x.x.
17+
18+
### Added
19+
20+
- `level` argument to `err` and `ret` to override the level of the generated
21+
return value event ([#2335])
22+
- Improved compiler error message when `#[instrument]` is added to a `const fn`
23+
([#2418])
24+
25+
### Changed
26+
27+
- Updated `syn` dependency to 2.0 ([#2516])
28+
29+
### Fixed
30+
31+
- Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356])
32+
- Removed unused "visit" feature flag from `syn` dependency ([#2530])
33+
34+
### Documented
35+
36+
- Documented default level for `err` ([#2433])
37+
- Improved documentation for levels in `#[instrument]` ([#2350])
38+
39+
Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack,
40+
@quad, @klensy, @davidpdrsn, and @dbidwell94 for contributign to this release!
41+
42+
[`syn`]: https://crates.io/crates/syn
43+
[#2335]: https://github.com/tokio-rs/tracing/pull/2335
44+
[#2418]: https://github.com/tokio-rs/tracing/pull/2418
45+
[#2516]: https://github.com/tokio-rs/tracing/pull/2516
46+
[#2356]: https://github.com/tokio-rs/tracing/pull/2356
47+
[#2530]: https://github.com/tokio-rs/tracing/pull/2530
48+
[#2433]: https://github.com/tokio-rs/tracing/pull/2433
49+
[#2350]: https://github.com/tokio-rs/tracing/pull/2350
50+
151
# 0.1.23 (October 6, 2022)
252

353
This release of `tracing-attributes` fixes a bug where compiler diagnostic spans
454
for type errors in `#[instrument]`ed `async fn`s have the location of the
555
`#[instrument]` attribute rather than the location of the actual error, and a
656
bug where inner attributes in `#[instrument]`ed functions would cause a compiler
757
error.
58+
859
### Fixed
960

1061
- Fix incorrect handling of inner attributes in `#[instrument]`ed functions ([#2307])

0 commit comments

Comments
 (0)