From 5dfa141e3594e57c840041562c1940179d152c69 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 16 Feb 2020 14:36:31 +0100 Subject: [PATCH] root/wsgi: log requests with event name of request --- docker/uwsgi.ini | 2 +- passbook/root/wsgi.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/uwsgi.ini b/docker/uwsgi.ini index 99957347f..fc0600844 100644 --- a/docker/uwsgi.ini +++ b/docker/uwsgi.ini @@ -7,4 +7,4 @@ threads = 2 enable-threads = true uid = passbook gid = passbook -disable-logging=True +disable-logging = True diff --git a/passbook/root/wsgi.py b/passbook/root/wsgi.py index 6ad62c0a3..b90cca62a 100644 --- a/passbook/root/wsgi.py +++ b/passbook/root/wsgi.py @@ -62,7 +62,8 @@ class WSGILogger: if environ.get("QUERY_STRING") != "": query_string = f"?{environ.get('QUERY_STRING')}" self.logger.info( - f"{environ.get('PATH_INFO', '')}{query_string}", + "request", + path=f"{environ.get('PATH_INFO', '')}{query_string}", host=host, method=environ.get("REQUEST_METHOD", ""), protocol=environ.get("SERVER_PROTOCOL", ""),