$request_time in ngx_http_log_module

Dorin RuV ruv.donita at gmail.com
Tue Aug 31 06:49:25 UTC 2021


Hi everybody,

I'm currently working on adjusting the logging format to our nginx proxies.
In order to comply to some logging endpoint standards I'm trying to find
the right place where I could convert the $request_time value from "seconds
with a millisecond resolution" to nanoseconds.
Can it be done in nginx itself (without lua)?
The following works but it's dirty:

map $request_time $request_time_no_decimal { ~(.*)\.(.*) $1$2; }

Best,
Dorin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210831/ec0f1f59/attachment.htm>


More information about the nginx mailing list