From 838852a7ed87b9afca0c0fbc63925e142c9342b5 Mon Sep 17 00:00:00 2001
From: Art Lukyanchyk <artiom.lukyanchyk@hs-hannover.de>
Date: Tue, 20 Feb 2018 14:54:02 +0100
Subject: [PATCH] Log additional exception info into debug (RPCError exceptions
 must be expected)

---
 pikatasks/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pikatasks/__init__.py b/pikatasks/__init__.py
index 0e9e138..9484f38 100644
--- a/pikatasks/__init__.py
+++ b/pikatasks/__init__.py
@@ -49,6 +49,7 @@ def run(_task_name, **kwargs):
                 properties=pika.BasicProperties()
             )
     except Exception as e:
+        logger.debug(traceback.format_exc())
         logger.error("{}: {}".format(e.__class__.__name__, str(e)))
         raise RPCMessageQueueError(e)
 
@@ -109,7 +110,7 @@ def rpc(_task_name, **kwargs):
             channel.start_consuming()
             channel.close()  # after stopped consuming by either of the callbacks
     except Exception as e:
-        logger.error(traceback.format_exc())
+        logger.debug(traceback.format_exc())
         logger.error("{}: {}".format(e.__class__.__name__, str(e)))
         exception = RPCMessageQueueError(e)
     # done, return the result or indicate a problem
-- 
GitLab