extras are now uppercase
Dieser Commit ist enthalten in:
Ursprung
008c5b866f
Commit
de00f29ea1
|
@ -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)
|
||||
|
|
Laden…
In neuem Issue referenzieren