Browse Source

Merge pull request #25 from asafc64/master

Fixed ignored extra fields when logging exceptions
opensearch
Roi Rav-Hon 7 years ago
committed by GitHub
parent
commit
3d4f6909b7
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