Reduce verbose logging from INFO to DEBUG/TRACE

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
This commit is contained in:
Claude
2025-11-12 10:02:38 +00:00
parent 81b990a828
commit 8ba6c1365a
3 changed files with 7 additions and 7 deletions

View File

@@ -752,7 +752,7 @@ async fn broadcast_flac_stream(
Ok(n) => { Ok(n) => {
total_bytes += n as u64; total_bytes += n as u64;
if total_bytes % 100000 == 0 || total_bytes < 10000 { 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 // Precise pacing based on audio timestamp

View File

@@ -137,7 +137,7 @@ impl NodeLogic for TimerNodeLogic {
SyncMarker::TopZeroSync => { SyncMarker::TopZeroSync => {
// Reset le timer de référence // Reset le timer de référence
self.start_time = Some(Instant::now()); self.start_time = Some(Instant::now());
tracing::info!("TimerNodeLogic: TopZeroSync received, timer reset"); tracing::debug!("TimerNodeLogic: TopZeroSync received, timer reset");
} }
_ => { _ => {
// Autres markers: passthrough transparent // Autres markers: passthrough transparent
@@ -156,7 +156,7 @@ impl NodeLogic for TimerNodeLogic {
if lead_time > self.max_lead_time_sec { if lead_time > self.max_lead_time_sec {
// On est trop en avance, attendre // On est trop en avance, attendre
let sleep_duration = lead_time - self.max_lead_time_sec; 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)", "TimerNodeLogic: SLEEPING {:.3}s (lead_time={:.3}s > max={:.1}s)",
sleep_duration, sleep_duration,
lead_time, lead_time,
@@ -166,7 +166,7 @@ impl NodeLogic for TimerNodeLogic {
tokio::select! { tokio::select! {
_ = tokio::time::sleep(Duration::from_secs_f64(sleep_duration)) => {} _ = tokio::time::sleep(Duration::from_secs_f64(sleep_duration)) => {}
_ = stop_token.cancelled() => { _ = stop_token.cancelled() => {
tracing::info!("TimerNodeLogic cancelled during sleep"); tracing::debug!("TimerNodeLogic cancelled during sleep");
break; break;
} }
} }

View File

@@ -518,7 +518,7 @@ impl<L: NodeLogic> AudioPipelineNode for Node<L> {
.. ..
} = *self; } = *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 // PHASE 1: SPAWNER TOUS LES ENFANTS
@@ -526,14 +526,14 @@ impl<L: NodeLogic> AudioPipelineNode for Node<L> {
let mut child_handles = Vec::new(); let mut child_handles = Vec::new();
for (i, child) in children.into_iter().enumerate() { 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 child_token = stop_token.child_token();
let handle = tokio::spawn(async move { let handle = tokio::spawn(async move {
child.run(child_token).await child.run(child_token).await
}); });
child_handles.push(handle); 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 // PHASE 2: MONITORER LES ENFANTS EN PARALLÈLE