From 5772b7d085194e121f43502b9b5c6e81824cadb2 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Tue, 10 Jan 2017 22:36:09 +0100
Subject: [PATCH] moar logging

---
 coolamqp/uplink/connection/connection.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/coolamqp/uplink/connection/connection.py b/coolamqp/uplink/connection/connection.py
index 6d5b45c..1c29356 100644
--- a/coolamqp/uplink/connection/connection.py
+++ b/coolamqp/uplink/connection/connection.py
@@ -34,6 +34,8 @@ class Connection(object):
         Connection created  ->  state is ST_CONNECTING
         .start() called     ->  state is ST_CONNECTING
         connection.open-ok  ->  state is ST_ONLINE
+
+    This logger is talkative mostly on INFO, and regarding connection state
     """
 
     def __init__(self, node_definition, listener_thread):
@@ -109,7 +111,7 @@ class Connection(object):
             else:
                 break
 
-        logger.info('Connected to broker, authentication in progress')
+        logger.debug('TCP connection established, authentication in progress')
 
         sock.settimeout(0)
         sock.send(b'AMQP\x00\x00\x09\x01')
@@ -198,6 +200,9 @@ class Connection(object):
         """
         watch_handled = False   # True if ANY watch handled this
 
+        if isinstance(frame, AMQPMethodFrame):
+            logger.debug('Received %s', frame.payload.NAME)
+
         # ==================== process per-channel watches
         if frame.channel in self.watches:
             watches = self.watches[frame.channel]       # a list
-- 
GitLab