From 2d2639089115c9c3ff42f103e52f21202af69f89 Mon Sep 17 00:00:00 2001 From: Jack Platten Date: Fri, 19 Dec 2025 16:49:28 -0800 Subject: [PATCH] use warn so we log appropriately --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/post_listener.rs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49d2db1..191a67f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,7 +100,7 @@ dependencies = [ [[package]] name = "at-comments" -version = "0.4.6" +version = "0.4.7" dependencies = [ "atrium-api", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 94954dd..c7d941f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "at-comments" -version = "0.4.6" +version = "0.4.7" edition = "2021" license = "MIT" diff --git a/src/post_listener.rs b/src/post_listener.rs index 8987a97..7e044a3 100644 --- a/src/post_listener.rs +++ b/src/post_listener.rs @@ -86,7 +86,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { None => chrono::Duration::days(1), }; if diff.num_days() >= 1 { - log::info!("[jetstream] Cursor is more than a day old, resetting cursor"); + log::warn!("[jetstream] Cursor is more than a day old, resetting cursor"); cursor = None; } @@ -94,7 +94,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { let endpoint_str = endpoints[endpoint_index].as_str(); match check_ws_endpoint_reachable(endpoint_str, 1500).await { Ok(()) => { - log::info!("[jetstream] Endpoint {} reachable (TCP)", endpoint_str); + log::warn!("[jetstream] Endpoint {} reachable (TCP)", endpoint_str); } Err(err) => { log::warn!( @@ -161,7 +161,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { } }; - log::info!( + log::warn!( "[jetstream] Listening for: {} and emoji: {} on endpoint {}", listener_config.poster_did, listener_config.target_emoji, @@ -180,7 +180,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { if let Commit(CommitEvent::Create { info, commit }) = event { if let AppBskyFeedPost(record) = commit.record { // check and see if this post is what we're looking for - log::info!("[jetstream] Checking record: {}", record.text); + log::warn!("[jetstream] Checking record: {}", record.text); if record.text.starts_with(&listener_config.target_emoji) { if let Some(facets) = record.facets.clone() { let features = facets @@ -218,7 +218,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { { log::error!("[jetstream] Failed to insert post: {}", e); } else { - log::info!("[jetstream] Inserted post"); + log::warn!("[jetstream] Inserted post"); } } } @@ -240,7 +240,7 @@ pub async fn websocket_listener(pool: sqlx::Pool) { // Reset retry_attempt if this connection was healthy (saw events or lasted past threshold). if saw_event || connected_at.elapsed().as_secs() > success_threshold_s { retry_attempt = 0; - log::info!("[jetstream] Connection was healthy; resetting retry attempts"); + log::warn!("[jetstream] Connection was healthy; resetting retry attempts"); } else { retry_attempt = retry_attempt.saturating_add(1); } -- 2.51.2