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?

  • Fix the log parser. It's very common for entries to appear "out of sequence". – Michael Hampton Jul 2 '15 at 15:49
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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.