|
| 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 | + |
1 | 51 | # 0.1.23 (October 6, 2022)
|
2 | 52 |
|
3 | 53 | This release of `tracing-attributes` fixes a bug where compiler diagnostic spans
|
4 | 54 | for type errors in `#[instrument]`ed `async fn`s have the location of the
|
5 | 55 | `#[instrument]` attribute rather than the location of the actual error, and a
|
6 | 56 | bug where inner attributes in `#[instrument]`ed functions would cause a compiler
|
7 | 57 | error.
|
| 58 | + |
8 | 59 | ### Fixed
|
9 | 60 |
|
10 | 61 | - Fix incorrect handling of inner attributes in `#[instrument]`ed functions ([#2307])
|
|
0 commit comments