gunicorn: output logs in JSON format.

This commit is contained in:
evazion
2022-06-29 14:41:58 -05:00
parent b71f7d654d
commit 24a842d847
+1
View File
@@ -8,4 +8,5 @@ threads = int(getenv("GUNICORN_THREADS", 4))
accesslog = getenv("GUNICORN_ACCESSLOG", "-")
errorlog = getenv("GUNICORN_ERRORLOG", "-")
loglevel = getenv("GUNICORN_LOGLEVEL", "info")
access_log_format = getenv("GUNICORN_ACCESS_LOG_FORMAT", '{"time":"%(t)s","id":"%({X-Request-Id}i)s","ip":"%(h)s","method":"%(m)s","url":"%(U)s","status":"%(s)s","contentType":"%(Content-Type)s","userAgent":"%(a)s","referer":"%(f)s","sent":"%(B)s"},"duration":"%(D)s"')
preload_app = bool(strtobool(getenv("GUNICORN_PRELOAD", "True")))