improve various logging
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
57e6af6e21
commit
15a990dc25
5 changed files with 33 additions and 78 deletions
|
@ -25,6 +25,7 @@ use tracing::{debug, error, info, trace, warn};
|
|||
|
||||
use super::state_compressor::CompressedStateEvent;
|
||||
use crate::{
|
||||
debug_info,
|
||||
service::{pdu, Arc, BTreeMap, HashMap, Result},
|
||||
services, Error, PduEvent,
|
||||
};
|
||||
|
@ -70,7 +71,7 @@ impl Service {
|
|||
/// room, if not soft fail it
|
||||
#[tracing::instrument(skip(self, origin, value, is_timeline_event, pub_key_map), name = "pdu")]
|
||||
pub(crate) async fn handle_incoming_pdu<'a>(
|
||||
&self, origin: &'a ServerName, event_id: &'a EventId, room_id: &'a RoomId,
|
||||
&self, origin: &'a ServerName, room_id: &'a RoomId, event_id: &'a EventId,
|
||||
value: BTreeMap<String, CanonicalJsonValue>, is_timeline_event: bool,
|
||||
pub_key_map: &'a RwLock<BTreeMap<String, BTreeMap<String, Base64>>>,
|
||||
) -> Result<Option<Vec<u8>>> {
|
||||
|
@ -647,9 +648,9 @@ impl Service {
|
|||
|
||||
// Event has passed all auth/stateres checks
|
||||
drop(state_lock);
|
||||
debug!(
|
||||
debug_info!(
|
||||
elapsed = ?timer.elapsed(),
|
||||
"Appended incoming pdu",
|
||||
"Accepted",
|
||||
);
|
||||
|
||||
Ok(pdu_id)
|
||||
|
|
|
@ -1183,7 +1183,7 @@ impl Service {
|
|||
services()
|
||||
.rooms
|
||||
.event_handler
|
||||
.handle_incoming_pdu(origin, &event_id, &room_id, value, false, pub_key_map)
|
||||
.handle_incoming_pdu(origin, &room_id, &event_id, value, false, pub_key_map)
|
||||
.await?;
|
||||
|
||||
let value = self.get_pdu_json(&event_id)?.expect("We just created it");
|
||||
|
|
|
@ -437,7 +437,7 @@ fn handle_resolve_error(e: &ResolveError) -> Result<()> {
|
|||
Ok(())
|
||||
},
|
||||
_ => {
|
||||
error!("{e}");
|
||||
error!("DNS {e}");
|
||||
Err(Error::Err(e.to_string()))
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue