From a302845b76a8b36fae8f29fe71ec857793da325d Mon Sep 17 00:00:00 2001 From: asafc64 Date: Wed, 9 May 2018 14:46:20 +0300 Subject: [PATCH] Fixed ignored extra fields when logging exceptions --- logzio/handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logzio/handler.py b/logzio/handler.py index 297df5b..f020453 100644 --- a/logzio/handler.py +++ b/logzio/handler.py @@ -88,13 +88,12 @@ class LogzioHandler(logging.Handler): return_json['exception'] = self.format_exception(message.exc_info) else: formatted_message = self.format(message) - return_json.update(self.extra_fields(message)) - if isinstance(formatted_message, dict): return_json.update(formatted_message) else: return_json['message'] = formatted_message + return_json.update(self.extra_fields(message)) return return_json def emit(self, record):