Skip to content

Commit

Permalink
tracing: fix wrong log level in warn! macro (#1930)
Browse files Browse the repository at this point in the history
## Motivation

I was scrolling through the code in `tracing/src/macros.rs` and noticed
a possibly wrong log level in the `warn!` macro:

https://github.com/tokio-rs/tracing/blob/4e65750b13721fee7a7ac05b053e1b9c3d21244f/tracing/src/macros.rs#L1698

## Solution

This branch changes the level to `Level::WARN` in the incorrect macro
 arm.

Fixes: #1929

Co-authored-by: Nicolaas Geldenhuys <nicolaas.geldenhuys@cartrack.com>
  • Loading branch information
2 people authored and hawkw committed Feb 17, 2022
1 parent e5921ba commit e6ddd21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracing/src/macros.rs
Expand Up @@ -1701,7 +1701,7 @@ macro_rules! warn {
(%$($k:ident).+ = $($field:tt)*) => (
$crate::event!(
target: module_path!(),
$crate::Level::TRACE,
$crate::Level::WARN,
{ %$($k).+ = $($field)*}
)
);
Expand Down

0 comments on commit e6ddd21

Please sign in to comment.