fix: reduce GetCascadeTrajectory log spam from debug to trace

This commit is contained in:
Nikketryhard
2026-02-14 21:43:36 -06:00
parent 940786c57f
commit f64f007421

View File

@@ -261,10 +261,18 @@ impl Backend {
let raw = resp.bytes().await let raw = resp.bytes().await
.map_err(|e| format!("Read body error: {e}"))?; .map_err(|e| format!("Read body error: {e}"))?;
let resp_bytes = decompress(method, &raw, &encoding); let resp_bytes = decompress(method, &raw, &encoding);
// High-frequency polling methods → trace; everything else → debug
if method.starts_with("GetCascadeTrajectory") {
tracing::trace!(
"{method} response ({status}, {} bytes, enc={encoding})",
resp_bytes.len(),
);
} else {
tracing::debug!( tracing::debug!(
"{method} response ({status}, {} bytes, enc={encoding})", "{method} response ({status}, {} bytes, enc={encoding})",
resp_bytes.len(), resp_bytes.len(),
); );
}
tracing::trace!( tracing::trace!(
"{method} body: {}", "{method} body: {}",
String::from_utf8_lossy(&resp_bytes[..resp_bytes.len().min(200)]) String::from_utf8_lossy(&resp_bytes[..resp_bytes.len().min(200)])