mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
Add length to access log
This commit is contained in:
parent
074f73acb4
commit
768b852eec
|
@ -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":
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user