From 78bcc652270e633ba7d85cde1f3027e18957d300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Weing=C3=A4rtner?= Date: Tue, 17 Sep 2019 22:55:59 -0300 Subject: [PATCH] Change logging for generic Exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are proposing to change the Logging of generic exceptions at "orchestrator.py". This will log an error message along with the stack trace, which is helpful for trobleshooting. Story: 2006568 Task: 36673 Change-Id: I879355a305dbce41c288e943fa2c815ee3758c4c Signed-off-by: Rafael Weingärtner --- cloudkitty/orchestrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudkitty/orchestrator.py b/cloudkitty/orchestrator.py index ad7546f3..7661d16b 100644 --- a/cloudkitty/orchestrator.py +++ b/cloudkitty/orchestrator.py @@ -281,7 +281,7 @@ class Worker(BaseWorker): metric=metric, ts=timestamp)) return metric, None except Exception as e: - LOG.warning( + LOG.exception( self._log_prefix + 'Error while collecting' ' metric {metric} at timestamp {ts}: {e}. Exiting.'.format( metric=metric, ts=timestamp, e=e))