demote a bunch of logs

This commit is contained in:
Jacob Taylor 2025-08-25 22:12:53 -07:00
commit 845a64b73d
3 changed files with 7 additions and 10 deletions

View file

@ -5,10 +5,7 @@ use std::{
}; };
use bytes::Bytes; use bytes::Bytes;
use conduwuit::{ use conduwuit::{Err, Error, Result, debug, debug::INFO_SPAN_LEVEL, err, error::inspect_debug_log, implement, trace, utils::string::EMPTY, warn, info};
Err, Error, Result, debug, debug::INFO_SPAN_LEVEL, err,
error::inspect_debug_log, implement, trace, utils::string::EMPTY, warn,
};
use http::{HeaderValue, header::AUTHORIZATION}; use http::{HeaderValue, header::AUTHORIZATION};
use ipaddress::IPAddress; use ipaddress::IPAddress;
use reqwest::{Client, Method, Request, Response, Url}; use reqwest::{Client, Method, Request, Response, Url};
@ -197,9 +194,9 @@ fn handle_error(
) -> Result { ) -> Result {
if e.is_timeout() || e.is_connect() { if e.is_timeout() || e.is_connect() {
e = e.without_url(); e = e.without_url();
warn!(?url, "network error while sending federation request: {e:?}"); trace!(?url, "network error while sending federation request: {e:?}");
} else if e.is_redirect() { } else if e.is_redirect() {
warn!( trace!(
method = ?method, method = ?method,
url = ?url, url = ?url,
final_url = ?e.url(), final_url = ?e.url(),
@ -208,7 +205,7 @@ fn handle_error(
e, e,
); );
} else { } else {
warn!(?url, "failed to send federation request: {e:?}"); trace!(?url, "failed to send federation request: {e:?}");
} }
let mut nice_error = "Request failed".to_owned(); let mut nice_error = "Request failed".to_owned();
@ -217,7 +214,7 @@ fn handle_error(
write!(nice_error, ": {source:?}").expect("writing to string should not fail"); write!(nice_error, ": {source:?}").expect("writing to string should not fail");
src = source.source(); src = source.source();
} }
warn!(nice_error, "Federation request error"); info!(nice_error, "Federation request error");
Err(e.into()) Err(e.into())
} }

View file

@ -4,7 +4,7 @@ use std::{
}; };
use conduwuit::{ use conduwuit::{
Event, PduEvent, debug, debug_error, debug_warn, implement, Event, PduEvent, debug, debug_error, implement,
matrix::event::gen_event_id_canonical_json, trace, utils::continue_exponential_backoff_secs, matrix::event::gen_event_id_canonical_json, trace, utils::continue_exponential_backoff_secs,
warn, warn,
}; };

View file

@ -890,7 +890,7 @@ impl Service {
for (event_id, result) in result.iter().flat_map(|resp| resp.pdus.iter()) { for (event_id, result) in result.iter().flat_map(|resp| resp.pdus.iter()) {
if let Err(e) = result { if let Err(e) = result {
info!( trace!(
%txn_id, %server, %txn_id, %server,
"error sending PDU {event_id} to remote server: {e:?}" "error sending PDU {event_id} to remote server: {e:?}"
); );