From 46c7d1bf7dd359e5eef6bc9eff023be7b9addb93 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 05:13:18 +0100 Subject: cleanup log messages --- src/transport/mycelium/mod.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/transport/mycelium/mod.rs') diff --git a/src/transport/mycelium/mod.rs b/src/transport/mycelium/mod.rs index 43d14a8..61aab85 100644 --- a/src/transport/mycelium/mod.rs +++ b/src/transport/mycelium/mod.rs @@ -144,11 +144,11 @@ impl MyceliumTransport { Ok(response) if response.status() == StatusCode::NO_CONTENT => break, Ok(response) if response.status().is_success() => discarded += 1, Ok(response) => { - tracing::warn!(status = %response.status(), "Couldn't drain the Mycelium inbox"); + tracing::warn!(status = %response.status(), "Couldn't drain the inbox"); break; } Err(error) => { - tracing::warn!(error = %error, "Couldn't drain the Mycelium inbox"); + tracing::warn!(error = %error, "Couldn't drain the inbox"); break; } } @@ -274,7 +274,7 @@ impl Transport for MyceliumTransport { let mut other_versions = std::collections::HashSet::new(); tracing::info!( endpoint = self.messages_endpoint.as_str(), - "Starting Mycelium message consumer" + "Starting the consumer" ); // Several polls at once, so one message's HTTP round trip overlaps the next one's @@ -351,7 +351,7 @@ async fn poll_inbox( tx: tokio::sync::mpsc::Sender, ) { loop { - tracing::trace!("Polling Mycelium inbox"); + tracing::trace!("Polling the inbox"); let response = match client .get(endpoint.clone()) @@ -362,7 +362,7 @@ async fn poll_inbox( { Ok(resp) => resp, Err(error) => { - tracing::warn!(error = %error, "Mycelium inbox poll failed"); + tracing::warn!(error = %error, "Polling the inbox failed"); tokio::time::sleep(Duration::from_millis(250)).await; continue; } @@ -371,13 +371,13 @@ async fn poll_inbox( let status = response.status(); if status == StatusCode::NO_CONTENT { - tracing::trace!("Mycelium inbox is empty"); + tracing::trace!("The inbox is empty"); tokio::time::sleep(EMPTY_QUEUE_DELAY).await; continue; } if !status.is_success() { - tracing::warn!(status = %status, "Mycelium inbox returned unsuccessful HTTP status"); + tracing::warn!(status = %status, "Polling the inbox failed"); tokio::time::sleep(Duration::from_millis(500)).await; continue; } @@ -392,7 +392,7 @@ async fn poll_inbox( continue; } Err(error) => { - tracing::warn!(error = %error, "Failed to read raw Mycelium response stream"); + tracing::warn!(error = %error, "Couldn't read a message from the inbox"); tokio::time::sleep(Duration::from_millis(100)).await; continue; } @@ -404,7 +404,7 @@ async fn poll_inbox( tracing::error!( error = %error, raw_payload = %String::from_utf8_lossy(&raw_bytes), - "Failed to decode inbound Mycelium message structure" + "Dropping a message that doesn't decode" ); tokio::time::sleep(Duration::from_millis(500)).await; continue; -- cgit v1.3.1