mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
don't write KBs of html to the logs
Handing this to tracing as a String makes it automatically escape newlines and such.
This commit is contained in:
parent
6aca128547
commit
12b0fb7f91
1 changed files with 8 additions and 5 deletions
|
|
@ -69,7 +69,9 @@ use crate::{
|
|||
api::client_server::{self, claim_keys_helper, get_keys_helper},
|
||||
observability::{FoundIn, Lookup, METRICS},
|
||||
service::pdu::{gen_event_id_canonical_json, PduBuilder},
|
||||
services, utils, Ar, Error, PduEvent, Ra, Result,
|
||||
services, utils,
|
||||
utils::dbg_truncate_str,
|
||||
Ar, Error, PduEvent, Ra, Result,
|
||||
};
|
||||
|
||||
/// Wraps either an literal IP address plus port, or a hostname plus complement
|
||||
|
|
@ -281,10 +283,11 @@ where
|
|||
if status != 200 {
|
||||
warn!(
|
||||
status = u16::from(status),
|
||||
response = String::from_utf8_lossy(&body)
|
||||
.lines()
|
||||
.collect::<Vec<_>>()
|
||||
.join(" "),
|
||||
response = dbg_truncate_str(
|
||||
String::from_utf8_lossy(&body).as_ref(),
|
||||
100,
|
||||
)
|
||||
.into_owned(),
|
||||
"Received error over federation",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue