diff --git a/json_logging/__init__.py b/json_logging/__init__.py index ce4571d..24894a2 100644 --- a/json_logging/__init__.py +++ b/json_logging/__init__.py @@ -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