Forum: NGINX Writing the total request time in seconds to an nginx access log, possibly using a calculated variab

Posted by tharsan (Guest)
on 2012-11-06 23:32
(Received via mailing list)
I'm trying to modify my nginx access log format to include the request
duration, in seconds.

I see two possible variables I could use:

1) $request_time (http://wiki.nginx.org/HttpLogModule#log_format)

2) $upstream_response_time
(http://wiki.nginx.org/NginxHttpUpstreamModule#.24u...)

However both of these variables are expressed in microseconds, and I 
need
this value to be rendered in seconds. Is there any way to specify the 
output
as an expression (i.e. $request_time * 1000) or accomplish this in some
other way?

Thanks,
Tharsan

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,232547,232547#msg-232547
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.