diff --git a/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py b/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py index 500b671..140619c 100644 --- a/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py +++ b/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py @@ -85,20 +85,20 @@ class Logger(gLogger): # - if atom doesn't exist replace it by '-' safe_atoms = self.atoms_wrapper_class(self.atoms(resp, req, environ, request_time)) extra = dict( - method=environ.get("REQUEST_METHOD"), - path=environ.get("PATH_INFO"), - query=environ.get("QUERY_STRING"), - proto=environ.get("SERVER_PROTOCOL"), - time="%d.%06d" % (request_time.seconds, request_time.microseconds), + METHOD=environ.get("REQUEST_METHOD"), + PATH=environ.get("PATH_INFO"), + QUERY=environ.get("QUERY_STRING"), + PROTO=environ.get("SERVER_PROTOCOL"), + TIME="%d.%06d" % (request_time.seconds, request_time.microseconds), ) if environ.get("REMOTE_ADDR", False): - extra["remote"] = environ.get("REMOTE_ADDR") + extra["REMOTE"] = environ.get("REMOTE_ADDR") if getattr(resp, "sent", False): - extra["length"] = getattr(resp, "sent") + extra["LENGTH"] = getattr(resp, "sent") if environ.get("HTTP_REFERER", False): - extra["referer"] = environ.get("HTTP_REFERER") + extra["REFERER"] = environ.get("HTTP_REFERER") if environ.get("HTTP_USER_AGENT", False): - extra["user_agent"] = environ.get("HTTP_USER_AGENT") + extra["USER_AGENT"] = environ.get("HTTP_USER_AGENT") try: self.access_log.info(self.cfg.access_log_format, safe_atoms, extra=extra)