From 17d006b04d88a9288a066539ed4580b8bf3e46ea Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Fri, 6 Sep 2019 16:39:14 +0200
Subject: [PATCH] SW-811: added connection_name to ToBus/FromBus __str__

---
 LCS/Messaging/python/messaging/messagebus.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/LCS/Messaging/python/messaging/messagebus.py b/LCS/Messaging/python/messaging/messagebus.py
index c994f3dd104..2be7fd8d22c 100644
--- a/LCS/Messaging/python/messaging/messagebus.py
+++ b/LCS/Messaging/python/messaging/messagebus.py
@@ -718,7 +718,7 @@ class FromBus(_AbstractBus):
         return nr_of_messages_in_queue(self.queue, self.broker)
 
     def __str__(self):
-        return "[FromBus] queue: %s on broker: %s" % (self.queue, self.broker)
+        return "[FromBus] queue: %s on broker: %s (%s)" % (self.queue, self.broker, self.connection_name)
 
 
 class ToBus(_AbstractBus):
@@ -821,7 +821,7 @@ class ToBus(_AbstractBus):
             raise MessagingError("[ToBus] Failed to send message to: %s error=%s" % (self.exchange, e))
 
     def __str__(self):
-        return "[ToBus] exchange: %s on broker: %s" % (self.exchange, self.broker)
+        return "[ToBus] exchange: %s on broker: %s (%s)" % (self.exchange, self.broker, self.connection_name)
 
 class TemporaryExchange:
     """
-- 
GitLab