parazyd 3 лет назад
Родитель
Сommit
78c4180c90
2 измененных файлов с 9 добавлено и 3 удалено
  1. 1 1
      src/net/protocol/protocol_ping.rs
  2. 8 2
      src/system/subscriber.rs

+ 1 - 1
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)

+ 8 - 2
src/system/subscriber.rs

@@ -87,7 +87,10 @@ impl<T: Clone> Subscriber<T> {
     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<T: Clone> Subscriber<T> {
             }
 
             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,
+                );
             }
         }
     }