Skip to content

Commit

Permalink
Merge pull request #92 from Exagone313/stringify-unserializable-extra
Browse files Browse the repository at this point in the history
improve: convert unserializable attributes to str in JSON serializer
  • Loading branch information
bobbui authored Nov 5, 2022
2 parents 5769f51 + 6945e1b commit 403d822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json_logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ENABLE_JSON_LOGGING_DEBUG = False
EMPTY_VALUE = '-'
CREATE_CORRELATION_ID_IF_NOT_EXISTS = True
JSON_SERIALIZER = lambda log: json.dumps(log, ensure_ascii=False)
JSON_SERIALIZER = lambda log: json.dumps(log, ensure_ascii=False, default=str)
CORRELATION_ID_HEADERS = ['X-Correlation-ID', 'X-Request-ID']
COMPONENT_ID = EMPTY_VALUE
COMPONENT_NAME = EMPTY_VALUE
Expand Down

0 comments on commit 403d822

Please sign in to comment.