mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Add milliseconds option to request_time in access_log (#2218)
Add milliseconds option to request_time in access_log
This commit is contained in:
parent
73ae195068
commit
d307045984
@ -178,6 +178,7 @@ b response length or ``'-'`` (CLF format)
|
|||||||
f referer
|
f referer
|
||||||
a user agent
|
a user agent
|
||||||
T request time in seconds
|
T request time in seconds
|
||||||
|
M request time in milliseconds
|
||||||
D request time in microseconds
|
D request time in microseconds
|
||||||
L request time in decimal seconds
|
L request time in decimal seconds
|
||||||
p process ID
|
p process ID
|
||||||
|
|||||||
@ -1272,6 +1272,7 @@ class AccessLogFormat(Setting):
|
|||||||
f referer
|
f referer
|
||||||
a user agent
|
a user agent
|
||||||
T request time in seconds
|
T request time in seconds
|
||||||
|
M request time in milliseconds
|
||||||
D request time in microseconds
|
D request time in microseconds
|
||||||
L request time in decimal seconds
|
L request time in decimal seconds
|
||||||
p process ID
|
p process ID
|
||||||
|
|||||||
@ -299,6 +299,7 @@ class Logger(object):
|
|||||||
'a': environ.get('HTTP_USER_AGENT', '-'),
|
'a': environ.get('HTTP_USER_AGENT', '-'),
|
||||||
'T': request_time.seconds,
|
'T': request_time.seconds,
|
||||||
'D': (request_time.seconds * 1000000) + request_time.microseconds,
|
'D': (request_time.seconds * 1000000) + request_time.microseconds,
|
||||||
|
'M': (request_time.seconds * 1000) + int(request_time.microseconds/1000),
|
||||||
'L': "%d.%06d" % (request_time.seconds, request_time.microseconds),
|
'L': "%d.%06d" % (request_time.seconds, request_time.microseconds),
|
||||||
'p': "<%s>" % os.getpid()
|
'p': "<%s>" % os.getpid()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user