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?

1
  • Fix the log parser. It's very common for entries to appear "out of sequence". Commented Jul 2, 2015 at 15:49

1 Answer 1

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.