Skip to content

Commit f81f775

Browse files
committed
improve logs
1 parent 0bc131c commit f81f775

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/peer_channels.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ impl Context {
315315

316316
pub(crate) async fn maybe_add_gossip_peer(&self, topic: TopicId, peer: NodeAddr) -> Result<()> {
317317
if let Some(iroh) = &*self.iroh.read().await {
318-
info!(self, "Adding (maybe existing) peer to gossip: {peer:?}");
318+
info!(
319+
self,
320+
"Adding (maybe existing) peer with id {} to gossip", peer.node_id
321+
);
319322
iroh.maybe_add_gossip_peer(topic, peer).await?;
320323
}
321324
Ok(())
@@ -353,12 +356,13 @@ pub async fn add_gossip_peer_from_header(
353356
return Ok(());
354357
}
355358

359+
let node_addr =
360+
serde_json::from_str::<NodeAddr>(node_addr).context("Failed to parse node address")?;
361+
356362
info!(
357363
context,
358-
"Adding iroh peer with address {node_addr:?} to the topic of {instance_id}."
364+
"Adding iroh peer with node id {} to the topic of {instance_id}.", node_addr.node_id
359365
);
360-
let node_addr =
361-
serde_json::from_str::<NodeAddr>(node_addr).context("Failed to parse node address")?;
362366

363367
context.emit_event(EventType::WebxdcRealtimeAdvertisementReceived {
364368
msg_id: instance_id,

0 commit comments

Comments
 (0)