|
@ -86,12 +86,16 @@ class LogzioHandler(logging.Handler): |
|
|
|
|
|
|
|
|
if message.exc_info: |
|
|
if message.exc_info: |
|
|
return_json['exception'] = self.format_exception(message.exc_info) |
|
|
return_json['exception'] = self.format_exception(message.exc_info) |
|
|
|
|
|
|
|
|
|
|
|
# We want to ignore default logging formatting on exceptions |
|
|
|
|
|
# As we handle those differently directly into exception field |
|
|
|
|
|
message.exc_info = None |
|
|
|
|
|
|
|
|
|
|
|
formatted_message = self.format(message) |
|
|
|
|
|
if isinstance(formatted_message, dict): |
|
|
|
|
|
return_json.update(formatted_message) |
|
|
else: |
|
|
else: |
|
|
formatted_message = self.format(message) |
|
|
|
|
|
if isinstance(formatted_message, dict): |
|
|
|
|
|
return_json.update(formatted_message) |
|
|
|
|
|
else: |
|
|
|
|
|
return_json['message'] = formatted_message |
|
|
|
|
|
|
|
|
return_json['message'] = formatted_message |
|
|
|
|
|
|
|
|
return_json.update(self.extra_fields(message)) |
|
|
return_json.update(self.extra_fields(message)) |
|
|
return return_json |
|
|
return return_json |
|
|