From 8ba6c1365ab465350c550f6a7568050f54fcbeec Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Nov 2025 10:02:38 +0000 Subject: [PATCH] Reduce verbose logging from INFO to DEBUG/TRACE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleaned up excessive INFO logging that was added during debugging. Logs are now properly categorized by verbosity: - Frequent/repeated logs (every chunk) → TRACE * TimerNode SLEEPING messages * Broadcaster "Read X bytes" messages - Occasional/setup logs → DEBUG * Node::run() starting/spawning * TopZeroSync received * Cancelled during sleep - Important events remain INFO * Encoder initialization * Header captured * Stream ended * Broadcaster task started This makes INFO logs clean and useful for production monitoring, while keeping detailed information available via DEBUG/TRACE levels. Tested with RUST_LOG=info - output is now clean with only meaningful events logged. Affected files: - pmoaudio/src/nodes/timer_node.rs: SLEEPING → trace, TopZeroSync → debug - pmoaudio/src/pipeline.rs: Node::run/Spawning → debug - pmoaudio-ext/src/sinks/streaming_flac_sink.rs: Read bytes → trace --- pmoaudio-ext/src/sinks/streaming_flac_sink.rs | 2 +- pmoaudio/src/nodes/timer_node.rs | 6 +++--- pmoaudio/src/pipeline.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pmoaudio-ext/src/sinks/streaming_flac_sink.rs b/pmoaudio-ext/src/sinks/streaming_flac_sink.rs index 9f8e1df7..30d8b61c 100644 --- a/pmoaudio-ext/src/sinks/streaming_flac_sink.rs +++ b/pmoaudio-ext/src/sinks/streaming_flac_sink.rs @@ -752,7 +752,7 @@ async fn broadcast_flac_stream( Ok(n) => { total_bytes += n as u64; if total_bytes % 100000 == 0 || total_bytes < 10000 { - info!("Read {} bytes from FLAC encoder (total: {})", n, total_bytes); + trace!("Read {} bytes from FLAC encoder (total: {})", n, total_bytes); } // Precise pacing based on audio timestamp diff --git a/pmoaudio/src/nodes/timer_node.rs b/pmoaudio/src/nodes/timer_node.rs index 4a74cef4..b960e040 100644 --- a/pmoaudio/src/nodes/timer_node.rs +++ b/pmoaudio/src/nodes/timer_node.rs @@ -137,7 +137,7 @@ impl NodeLogic for TimerNodeLogic { SyncMarker::TopZeroSync => { // Reset le timer de référence self.start_time = Some(Instant::now()); - tracing::info!("TimerNodeLogic: TopZeroSync received, timer reset"); + tracing::debug!("TimerNodeLogic: TopZeroSync received, timer reset"); } _ => { // Autres markers: passthrough transparent @@ -156,7 +156,7 @@ impl NodeLogic for TimerNodeLogic { if lead_time > self.max_lead_time_sec { // On est trop en avance, attendre let sleep_duration = lead_time - self.max_lead_time_sec; - tracing::info!( + tracing::trace!( "TimerNodeLogic: SLEEPING {:.3}s (lead_time={:.3}s > max={:.1}s)", sleep_duration, lead_time, @@ -166,7 +166,7 @@ impl NodeLogic for TimerNodeLogic { tokio::select! { _ = tokio::time::sleep(Duration::from_secs_f64(sleep_duration)) => {} _ = stop_token.cancelled() => { - tracing::info!("TimerNodeLogic cancelled during sleep"); + tracing::debug!("TimerNodeLogic cancelled during sleep"); break; } } diff --git a/pmoaudio/src/pipeline.rs b/pmoaudio/src/pipeline.rs index c400e5fd..4c8b9594 100755 --- a/pmoaudio/src/pipeline.rs +++ b/pmoaudio/src/pipeline.rs @@ -518,7 +518,7 @@ impl AudioPipelineNode for Node { .. } = *self; - tracing::info!("Node::run() starting with {} children", children.len()); + tracing::debug!("Node::run() starting with {} children", children.len()); // ═══════════════════════════════════════════════════════════════════ // PHASE 1: SPAWNER TOUS LES ENFANTS @@ -526,14 +526,14 @@ impl AudioPipelineNode for Node { let mut child_handles = Vec::new(); for (i, child) in children.into_iter().enumerate() { - tracing::info!("Spawning child {}", i); + tracing::debug!("Spawning child {}", i); let child_token = stop_token.child_token(); let handle = tokio::spawn(async move { child.run(child_token).await }); child_handles.push(handle); } - tracing::info!("All {} children spawned", child_handles.len()); + tracing::debug!("All {} children spawned", child_handles.len()); // ═══════════════════════════════════════════════════════════════════ // PHASE 2: MONITORER LES ENFANTS EN PARALLÈLE