<div dir="ltr">Hi everybody,<div><br></div><div>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.</div><div>Can it be done in nginx itself (without lua)?</div><div>The following works but it's dirty:<br><br></div><div><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;font-weight:600;white-space:pre-wrap;background-color:rgb(248,248,248)">map </span><span class="gmail-hljs-variable" style="box-sizing:border-box;margin:0px;padding:0px;vertical-align:baseline;border:0px solid;font-size:13px;color:teal;font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-weight:600;white-space:pre-wrap">$request_time</span><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;font-weight:600;white-space:pre-wrap;background-color:rgb(248,248,248)"> </span><span class="gmail-hljs-variable" style="box-sizing:border-box;margin:0px;padding:0px;vertical-align:baseline;border:0px solid;font-size:13px;color:teal;font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-weight:600;white-space:pre-wrap">$request_time_no_decimal</span><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;font-weight:600;white-space:pre-wrap;background-color:rgb(248,248,248)"> { ~(.*)\.(.*) </span><span class="gmail-hljs-variable" style="box-sizing:border-box;margin:0px;padding:0px;vertical-align:baseline;border:0px solid;font-size:13px;color:teal;font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-weight:600;white-space:pre-wrap">$1</span><span class="gmail-hljs-variable" style="box-sizing:border-box;margin:0px;padding:0px;vertical-align:baseline;border:0px solid;font-size:13px;color:teal;font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-weight:600;white-space:pre-wrap">$2</span><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;font-weight:600;white-space:pre-wrap;background-color:rgb(248,248,248)">; }</span><br></div><div><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;font-weight:600;white-space:pre-wrap;background-color:rgb(248,248,248)"><br></span></div><div><div>Best,</div><div>Dorin</div></div></div>