refactor(stream): route audio/realtime effect-processing error through tracing
The realtime effects loop in src/audio/realtime.rs was using `eprintln!` to surface effect processing errors. That bypasses the tracing subscriber and so the error never reaches the OTel collector or the structured-log pipeline — invisible to operators in prod. Switched to `tracing::error!` with the error captured as a structured field, matching the rest of the stream server. Why this was the only console-style call to fix: The earlier audit reported 23 `console.log` instances across the codebase, but most were in JSDoc/Markdown blocks or commented-out lines. The actual production-code count, after stripping comments, was zero on the frontend, zero in the backend API server (the `fmt.Print*` calls live in CLI tools under cmd/ and are legitimate), and one in the stream server (this fix). The rest of the Rust println! calls are in load-test binaries and #[cfg(test)] blocks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
34a0547f78
commit
dfc61e8408
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ use parking_lot::{Mutex, RwLock};
|
|||
use std::collections::VecDeque;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use tracing::error;
|
||||
|
||||
/// Buffer circulaire thread-safe pour audio temps réel
|
||||
#[derive(Debug)]
|
||||
|
|
@ -319,7 +320,7 @@ impl RealtimeAudioProcessor {
|
|||
config.sample_rate,
|
||||
config.channels,
|
||||
) {
|
||||
eprintln!("Effect processing error: {:?}", e);
|
||||
error!(error = ?e, "Effect processing error");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue