Skip to content

Commit dc2cca1

Browse files
committed
fix: utilize python-json-logger formatters
Refs: PV-989
1 parent e365a3c commit dc2cca1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gunicorn.conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# https://docs.gunicorn.org/en/stable/settings.html
2-
from logger_extra.extras.gunicorn import JsonErrorFormatter, JsonFormatter
32

43
wsgi_app = "project.wsgi"
54
bind = "0.0.0.0:8888"
@@ -15,10 +14,12 @@
1514
},
1615
"formatters": {
1716
"json": {
18-
"()": JsonFormatter,
17+
"()": "pythonjsonlogger.jsonlogger.JsonFormatter",
18+
"format": "%(asctime)s %(name)s %(levelname)s %(message)s",
1919
},
2020
"json_error": {
21-
"()": JsonErrorFormatter,
21+
"()": "pythonjsonlogger.jsonlogger.JsonFormatter",
22+
"format": "%(asctime)s %(name)s %(levelname)s %(message)s",
2223
},
2324
},
2425
"handlers": {

0 commit comments

Comments
 (0)