From b37d8afd290854d915d6f35377d13de439a939ea Mon Sep 17 00:00:00 2001 From: nicolaasg <87317085+nicolaasg@users.noreply.github.com> Date: Wed, 16 Feb 2022 21:58:22 +0200 Subject: [PATCH] tracing: fix wrong log level in `warn!` macro (#1930) ## 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 --- tracing/src/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing/src/macros.rs b/tracing/src/macros.rs index 7bf2ec18a3..0d52c4cdec 100644 --- a/tracing/src/macros.rs +++ b/tracing/src/macros.rs @@ -1701,7 +1701,7 @@ macro_rules! warn { (%$($k:ident).+ = $($field:tt)*) => ( $crate::event!( target: module_path!(), - $crate::Level::TRACE, + $crate::Level::WARN, { %$($k).+ = $($field)*} ) );