From 477b5f06cbb295a2df3ec87ffba3f88c85df7e0c Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 11 Feb 2026 09:09:10 -0600 Subject: [PATCH] Promote job lifecycle logging from debug to info level Job receipt, start, and completion messages were all at debug level, making it impossible to tell if the agent was processing jobs without setting LOG_LEVEL=debug. --- src/websocket_client.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/websocket_client.rs b/src/websocket_client.rs index 678c0d7..da49b0e 100644 --- a/src/websocket_client.rs +++ b/src/websocket_client.rs @@ -330,7 +330,7 @@ impl AgentClient { /// No long-running tasks are spawned - the agent is stateless. /// Server handles all scheduling and retries via Oban. async fn handle_jobs(&self, job_list: AgentJobList) -> Result<()> { - tracing::debug!("Received {} jobs from server", job_list.jobs.len()); + tracing::info!("Received {} jobs from server", job_list.jobs.len()); // Collect device IDs from current jobs let mut current_device_ids = std::collections::HashSet::new(); @@ -352,7 +352,7 @@ impl AgentClient { for job in job_list.jobs { let job_type = JobType::try_from(job.job_type).unwrap_or(JobType::Poll); - tracing::debug!("Executing job: {} (type: {:?})", job.job_id, job_type); + tracing::info!("Starting job: {} (type: {:?})", job.job_id, job_type); match job_type { JobType::Mikrotik => { @@ -476,7 +476,7 @@ impl AgentClient { .await .map_err(|e| format!("Writer task closed: {}", e))?; - tracing::debug!("Sent SNMP result for device {}", result.device_id); + tracing::info!("Completed SNMP job for device {}", result.device_id); Ok(()) } @@ -497,8 +497,8 @@ impl AgentClient { .await .map_err(|e| format!("Writer task closed: {}", e))?; - tracing::debug!( - "Sent MikroTik result for device {} (job: {})", + tracing::info!( + "Completed MikroTik job for device {} (job: {})", result.device_id, result.job_id ); @@ -522,8 +522,8 @@ impl AgentClient { .await .map_err(|e| format!("Writer task closed: {}", e))?; - tracing::debug!( - "Sent credential test result (test_id: {}, success: {})", + tracing::info!( + "Completed credential test (test_id: {}, success: {})", result.test_id, result.success ); @@ -547,8 +547,8 @@ impl AgentClient { .await .map_err(|e| format!("Writer task closed: {}", e))?; - tracing::debug!( - "Sent monitoring check for device {} (status: {})", + tracing::info!( + "Completed ping check for device {} (status: {})", result.device_id, result.status );