0

I have an nginx log parser which relies on fact, nginx log entries placed in sequential order. But from time to time I have log like this:

[2015-07-01T08:41:59-07:00] https "GET ...
[2015-07-01T08:42:00-07:00] https "POST ...
[2015-07-01T08:41:59-07:00] https "GET ...

Is there any way to get ngx write log entries strongly sequential or I should change parser behavior?

Oliver
  • 5,973
  • 24
  • 33

1 Answers1

0

As far as I know, the time you can see in the log is the time when the request arrived at the server. The reason why you don't see the requests in the correct order is that you typically also log information which is only known once the request is processed (return status, response length etc.).

I see two options:

  • change your parser
  • sort the input before parsing it
Oliver
  • 5,973
  • 24
  • 33