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.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-11-02 14:16:35 -03:00
parent aa02defb56
commit f2b90e168c
2 changed files with 6 additions and 6 deletions

View file

@ -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<AppState>, 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<AppState>, 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<AppState>, 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)

View file

@ -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();