From 973b8b72ad827b35454d5b1c6b040a8a4025d86e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 21 Feb 2016 12:31:16 +0000 Subject: [PATCH] Show time taken on runserver output --- channels/management/commands/runserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/management/commands/runserver.py b/channels/management/commands/runserver.py index 79fd42a..b056d15 100644 --- a/channels/management/commands/runserver.py +++ b/channels/management/commands/runserver.py @@ -95,7 +95,7 @@ class Command(RunserverCommand): msg = "[%s] " % datetime.datetime.now().strftime("%Y/%m/%d %H:%M:%S") # HTTP requests if protocol == "http" and action == "complete": - msg += "HTTP %(method)s %(path)s %(status)s [%(client)s]\n" % details + msg += "HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]\n" % details # Utilize terminal colors, if available if 200 <= details['status'] < 300: # Put 2XX first, since it should be the common case