From 044f23db6958639935a15039cba5415957130268 Mon Sep 17 00:00:00 2001 From: Kim Altintop Date: Mon, 2 Jun 2025 11:32:59 +0200 Subject: [PATCH] client-api: Don't debug-print dropped outgoing Ws messages at info It's not impossible for a client to disconnect while there are outstanding subscription messages (e.g. `st_client` updates), and printing them all to the log at info level just creates a lot of data with limited value. Print them at debug level instead. --- crates/client-api/src/routes/subscribe.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/client-api/src/routes/subscribe.rs b/crates/client-api/src/routes/subscribe.rs index 64ffc4e3e3d..c99898fd637 100644 --- a/crates/client-api/src/routes/subscribe.rs +++ b/crates/client-api/src/routes/subscribe.rs @@ -296,7 +296,8 @@ async fn ws_client_actor_inner( // TODO: this isn't great. when we receive a close request from the peer, // tungstenite doesn't let us send any new messages on the socket, // even though the websocket RFC allows it. should we fork tungstenite? - log::info!("dropping messages due to ws already being closed: {:?}", &rx_buf[..n]); + log::info!("dropping {n} messages due to ws already being closed"); + log::debug!("dropped messages: {:?}", &rx_buf[..n]); } else { let send_all = async { for msg in rx_buf.drain(..n) {