mirror of
https://github.com/django/daphne.git
synced 2025-04-20 16:52:03 +03:00
Show time taken on runserver output
This commit is contained in:
parent
8221bbc0be
commit
973b8b72ad
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user