From 22ece35a46b15b8df27edc180bcdaa6a9f91190f Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Wed, 10 Sep 2025 22:06:03 +0200 Subject: [PATCH] fix: change to tracing::error level --- src/clients/macros.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/clients/macros.rs b/src/clients/macros.rs index f9f6fb4..111e2a4 100644 --- a/src/clients/macros.rs +++ b/src/clients/macros.rs @@ -1,6 +1,6 @@ #[macro_export] /// Make a GET request sending and expecting JSON. -/// if JSON deser fails, emit a `WARN` level tracing event +/// if JSON deser fails, emit a `ERROR` level tracing event macro_rules! json_get { ($client:expr, $url:expr, $expected:ty, $exp_backoff:expr) => { json_get!($client, $url, $expected, "", $exp_backoff) @@ -27,7 +27,7 @@ macro_rules! json_get { |error, duration: std::time::Duration| { let duration = duration.as_secs(); - tracing::warn!( + tracing::error!( method = "GET", url = %url, ?error, @@ -38,7 +38,7 @@ macro_rules! json_get { .await { Ok(resp) => resp, Err(error) => { - tracing::warn!( + tracing::error!( method = "GET", url = %url, ?error, @@ -51,7 +51,7 @@ macro_rules! json_get { } else { match req.send().await { Err(error) => { - tracing::warn!( + tracing::error!( method = "GET", url = %url, ?error, @@ -75,7 +75,7 @@ macro_rules! json_get { match result { Err(e) => { - tracing::warn!( + tracing::error!( method = "GET", url = %url, response = text.as_str(), @@ -93,7 +93,7 @@ macro_rules! json_get { #[macro_export] /// Make a PUT request sending JSON. -/// if JSON deser fails, emit a `WARN` level tracing event +/// if JSON deser fails, emit a `ERROR` level tracing event macro_rules! json_put { ($client:expr, $url:expr, $auth_token:expr, $body:expr) => { json_put!($client, $url, (), $auth_token, $body) @@ -112,7 +112,7 @@ macro_rules! json_put { .send() .await { Err(error) => { - tracing::warn!( + tracing::error!( method = "PUT", url = %url, body = body, @@ -129,7 +129,7 @@ macro_rules! json_put { let result: $crate::clients::common::ClientResponse<$expected> = text.parse()?; if result.is_err() { - tracing::warn!( + tracing::error!( method = "PUT", url = %url, body,