fix: reduce GetCascadeTrajectory log spam from debug to trace
This commit is contained in:
@@ -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)])
|
||||||
|
|||||||
Reference in New Issue
Block a user