From b7279d27afa0d270368e4066d2e397b51d6057e4 Mon Sep 17 00:00:00 2001 From: Charlotte Som Date: Wed, 27 Nov 2024 07:32:41 +0200 Subject: [PATCH] log host on indexing error --- src/indexer.rs | 4 ++-- src/request_crawl.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/indexer.rs b/src/indexer.rs index a609c7a..2adca0c 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -455,8 +455,8 @@ pub fn index_servers(server: Arc, hosts: &[String]) { let host = host.to_string(); let server = Arc::clone(&server); tokio::task::spawn(async move { - if let Err(e) = index_server(server, host).await { - tracing::warn!("encountered error subscribing to PDS: {e:?}"); + if let Err(e) = index_server(server, host.clone()).await { + tracing::warn!(%host, "encountered error subscribing to PDS: {e:?}"); } }); } diff --git a/src/request_crawl.rs b/src/request_crawl.rs index 7d9678b..bb63e11 100644 --- a/src/request_crawl.rs +++ b/src/request_crawl.rs @@ -29,8 +29,8 @@ pub async fn handle_request_crawl( let hostname = input.data.hostname; tokio::task::spawn(async move { - if let Err(e) = index_server(server, hostname).await { - tracing::warn!("encountered error subscribing to PDS: {e:?}"); + if let Err(e) = index_server(server, hostname.clone()).await { + tracing::warn!(host = %hostname, "encountered error subscribing to PDS: {e:?}"); } });