Add length to access log

This commit is contained in:
Andrew Godwin 2016-04-03 21:02:35 -07:00
parent 074f73acb4
commit 768b852eec
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class AccessLogGenerator(object):
date=datetime.datetime.now(),
request="%(method)s %(path)s" % details,
status=details['status'],
length=details['size'],
)
# Websocket requests
elif protocol == "websocket" and action == "connected":

View File

@ -176,6 +176,7 @@ class WebRequest(http.Request):
"method": self.method.decode("ascii"),
"client": "%s:%s" % (self.client.host, self.client.port),
"time_taken": self.duration(),
"size": self.sentLength,
})
else:
logger.debug("HTTP response chunk for %s", self.reply_channel)