diff options
| author | tv <tv@krebsco.de> | 2026-10-28 05:13:18 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-28 05:13:18 +0100 |
| commit | 46c7d1bf7dd359e5eef6bc9eff023be7b9addb93 (patch) | |
| tree | 31da0cac4911f8825dc8c602a9b6182cbb9b3eab /src/transport/mycelium/mod.rs | |
| parent | 617575073693643aab33c63bf6ba03fa30933c2e (diff) | |
cleanup log messages
Diffstat (limited to 'src/transport/mycelium/mod.rs')
| -rw-r--r-- | src/transport/mycelium/mod.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<InboundMessage>, ) { 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; |
