Skip to content

Commit 073afeb

Browse files
committed
improve logs
1 parent 6987a29 commit 073afeb

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
@@ -314,7 +314,10 @@ impl Context {
314314

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

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

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

0 commit comments

Comments
 (0)