From 78c4180c9082574617464160160bb32b142fa4bd Mon Sep 17 00:00:00 2001 From: parazyd Date: Thu, 10 Aug 2023 17:23:57 +0200 Subject: [PATCH] net: Improve log message. --- src/net/protocol/protocol_ping.rs | 2 +- src/system/subscriber.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/net/protocol/protocol_ping.rs b/src/net/protocol/protocol_ping.rs index a5152321d..b13195989 100644 --- a/src/net/protocol/protocol_ping.rs +++ b/src/net/protocol/protocol_ping.rs @@ -108,7 +108,7 @@ impl ProtocolPing { // so close the connection. warn!( target: "net::protocol_ping::run_ping_pong()", - "Ping-Pong protocol timed out for {}", self.channel.address(), + "[P2P] Ping-Pong protocol timed out for {}", self.channel.address(), ); self.channel.stop().await; return Err(Error::ChannelStopped) diff --git a/src/system/subscriber.rs b/src/system/subscriber.rs index 3c0dd2dea..def0065be 100644 --- a/src/system/subscriber.rs +++ b/src/system/subscriber.rs @@ -87,7 +87,10 @@ impl Subscriber { pub async fn notify(&self, message_result: T) { for sub in (*self.subs.lock().await).values() { if let Err(e) = sub.send(message_result.clone()).await { - warn!(target: "system::subscriber", "Error returned sending message in notify() call! {}", e); + warn!( + target: "system::subscriber", + "[system::subscriber] Error returned sending message in notify() call: {}", e, + ); } } } @@ -99,7 +102,10 @@ impl Subscriber { } if let Err(e) = sub.send(message_result.clone()).await { - warn!(target: "system::subscriber", "Error returned sending message in notify_with_exclude() call! {}", e); + warn!( + target: "system::subscriber", + "[system::subscriber] Error returned sending message in notify_with_exclude() call! {}", e, + ); } } }