I'm aware of the $msec
logging parameter which gives the request time as seconds since Unix epoch with millisecond granularity. However, the format of this includes a period '.' e.g. '1407233265.472' and this is a problem for the import function that I'm using to parse the log files.
Is there a way (log parameter or plugin) that will allow the request time to be recorded in total milliseconds? e.g. '1407233265472'. Am happy to compile nginx as required.
Best Answer
There are 2 ways to achieve this. The first one is dirty and I wont recommend it - it's the fastest way though:
This is much cleaner but requires lua:
then just log $epoch_millis