From db6d451c90e28106724f9be135949cb28469cd29 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 23 Oct 2024 17:14:03 +0000 Subject: [PATCH] feat: add more logging for iroh initialization and peer addition --- src/peer_channels.rs | 1 + src/receive_imf.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/peer_channels.rs b/src/peer_channels.rs index c77ca0f40..f4b33e60d 100644 --- a/src/peer_channels.rs +++ b/src/peer_channels.rs @@ -232,6 +232,7 @@ impl ChannelState { impl Context { /// Create iroh endpoint and gossip. async fn init_peer_channels(&self) -> Result { + info!(self, "Initializing peer channels."); let secret_key = SecretKey::generate(); let public_key = secret_key.public(); diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 0da6c1244..726edfc5f 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -1461,10 +1461,11 @@ async fn add_parts( let iroh = context.get_or_try_init_peer_channel().await?; iroh.maybe_add_gossip_peers(topic, vec![node_addr]).await?; } + info!(context, "Added iroh peer to the topic of {instance_id}."); } else { warn!( context, - "Could not add iroh peer because {instance_id} has no topic" + "Could not add iroh peer because {instance_id} has no topic." ); } chat_id = DC_CHAT_ID_TRASH;