From feeb9d9c188f4a41204a118e2a79de776590a526 Mon Sep 17 00:00:00 2001 From: oudecheng <13802883547@139.com> Date: Fri, 7 Aug 2026 09:01:33 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=99=8D=E4=BD=8E=20list=5Ftodos=20?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB=E4=B8=BA=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前端每次 todo_write 后自动刷新会触发 list_todos 命令,子代理多次更新待办时产生大量 INFO 日志噪音。将 handler 与 gateway 转发两处日志降级为 debug,默认不输出,需要排查时通过 RUST_LOG=debug 开启。 --- src/command/handlers/list_todos.rs | 2 +- src/gateway/ws.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command/handlers/list_todos.rs b/src/command/handlers/list_todos.rs index 1484e79..fd07b8e 100644 --- a/src/command/handlers/list_todos.rs +++ b/src/command/handlers/list_todos.rs @@ -64,7 +64,7 @@ impl CommandHandler for ListTodosCommandHandler { .list_todos(&scope_key) .map_err(|e| CommandError::new("LIST_TODOS_ERROR", e.to_string()))?; - tracing::info!( + tracing::debug!( scope_key = %scope_key, record_count = records.len(), "list_todos handler: reading from store" diff --git a/src/gateway/ws.rs b/src/gateway/ws.rs index c3ff104..0d79a4e 100644 --- a/src/gateway/ws.rs +++ b/src/gateway/ws.rs @@ -676,7 +676,7 @@ async fn handle_inbound( .get("todos_scope_key") .cloned() .unwrap_or_default(); - tracing::info!(todo_count = todos.len(), %scope_key, "list_todos command response"); + tracing::debug!(todo_count = todos.len(), %scope_key, "list_todos command response"); let _ = sender.send(WsOutbound::TodoList { todos, scope_key }).await; } }