diff --git a/daphne/access.py b/daphne/access.py index a3508ea..9bd1489 100644 --- a/daphne/access.py +++ b/daphne/access.py @@ -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": diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 138aea1..0c47d66 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -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)