Browse Source

Fixed ignored extra fields when logging exceptions

opensearch
asafc64 6 years ago
committed by GitHub
parent
commit
a302845b76
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      logzio/handler.py

+ 1
- 2
logzio/handler.py View File

@ -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):


Loading…
Cancel
Save