Skip to content

Commit 94ff0f1

Browse files
Merge pull request #56 from ViokingTung/master
Update api_logger_middleware.py
2 parents a6e1b34 + 096f54b commit 94ff0f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drf_api_logger/middleware/api_logger_middleware.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def __call__(self, request):
133133
if self.DRF_API_LOGGER_DATABASE:
134134
if LOGGER_THREAD:
135135
d = data.copy()
136-
d['headers'] = json.dumps(d['headers'], indent=4)
136+
d['headers'] = json.dumps(d['headers'], indent=4, ensure_ascii=False)
137137
if request_data:
138-
d['body'] = json.dumps(d['body'], indent=4)
139-
d['response'] = json.dumps(d['response'], indent=4)
138+
d['body'] = json.dumps(d['body'], indent=4, ensure_ascii=False)
139+
d['response'] = json.dumps(d['response'], indent=4, ensure_ascii=False)
140140
LOGGER_THREAD.put_log_data(data=d)
141141
if self.DRF_API_LOGGER_SIGNAL:
142142
API_LOGGER_SIGNAL.listen(**data)

0 commit comments

Comments
 (0)