root/wsgi: log requests with event name of request

This commit is contained in:
Jens Langhammer 2020-02-16 14:36:31 +01:00
parent 447e81d0b8
commit 5dfa141e35
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,8 @@ class WSGILogger:
if environ.get("QUERY_STRING") != "": if environ.get("QUERY_STRING") != "":
query_string = f"?{environ.get('QUERY_STRING')}" query_string = f"?{environ.get('QUERY_STRING')}"
self.logger.info( self.logger.info(
f"{environ.get('PATH_INFO', '')}{query_string}", "request",
path=f"{environ.get('PATH_INFO', '')}{query_string}",
host=host, host=host,
method=environ.get("REQUEST_METHOD", ""), method=environ.get("REQUEST_METHOD", ""),
protocol=environ.get("SERVER_PROTOCOL", ""), protocol=environ.get("SERVER_PROTOCOL", ""),