From f2beef5d86cfef7cb1d9ead95c0a5e733da3d94c Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 2 Nov 2025 14:16:35 -0300 Subject: [PATCH] feat(logging): replace debug with trace for verbose operations Changed debug logging to trace level for Redis suggestion operations and drive monitor object listings. This better reflects the verbosity level of these operations since they are more detailed debugging information. Also updated "Redis client" to "Cache client" in a debug message for consistency with the broader cache abstraction. --- src/basic/keywords/add_suggestion.rs | 8 ++++---- src/drive_monitor/mod.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/basic/keywords/add_suggestion.rs b/src/basic/keywords/add_suggestion.rs index aeb5ca86..b4324aac 100644 --- a/src/basic/keywords/add_suggestion.rs +++ b/src/basic/keywords/add_suggestion.rs @@ -1,6 +1,6 @@ use crate::shared::state::AppState; use crate::shared::models::UserSession; -use log::{debug, error, info}; +use log::{trace, debug, error, info}; use rhai::{Dynamic, Engine}; use serde_json::json; use std::sync::Arc; @@ -35,7 +35,7 @@ pub fn add_suggestion_keyword(state: Arc, user_session: UserSession, e match result { Ok(length) => { - debug!("Suggestion added successfully to Redis key {}, new length: {}", redis_key, length); + trace!("Suggestion added successfully to Redis key {}, new length: {}", redis_key, length); // Also register context as inactive initially let active_key = format!("active_context:{}:{}", user_session.user_id, user_session.id); @@ -47,7 +47,7 @@ pub fn add_suggestion_keyword(state: Arc, user_session: UserSession, e match hset_result { Ok(fields_added) => { - debug!("Context state set to inactive for {}, fields added: {}", context_name, fields_added) + trace!("Context state set to inactive for {}, fields added: {}", context_name, fields_added) }, Err(e) => error!("Failed to set context state: {}", e), } @@ -55,7 +55,7 @@ pub fn add_suggestion_keyword(state: Arc, user_session: UserSession, e Err(e) => error!("Failed to add suggestion to Redis: {}", e), } } else { - debug!("No Redis client configured; suggestion will not persist"); + debug!("No Cache client configured; suggestion will not persist"); } Ok(Dynamic::UNIT) diff --git a/src/drive_monitor/mod.rs b/src/drive_monitor/mod.rs index 5154e7d1..cfe1b8a8 100644 --- a/src/drive_monitor/mod.rs +++ b/src/drive_monitor/mod.rs @@ -86,7 +86,7 @@ impl DriveMonitor { .set_continuation_token(continuation_token) .send() .await?; - debug!("List objects result: {:?}", list_objects); + trace!("List objects result: {:?}", list_objects); for obj in list_objects.contents.unwrap_or_default() { let path = obj.key().unwrap_or_default().to_string(); @@ -164,7 +164,7 @@ impl DriveMonitor { .set_continuation_token(continuation_token) .send() .await?; - debug!("List objects result: {:?}", list_objects); + trace!("List objects result: {:?}", list_objects); for obj in list_objects.contents.unwrap_or_default() { let path = obj.key().unwrap_or_default().to_string();