1

I have a query in Log Insights that prints some messages from the web.stdout.log file and sorts them by @timestamp.

When the timestamp is the same for two messages, it prints them with no order. Is there any way to sort the messages by the same order as they are printed in the original log file (web.stdout.log)?

Angela
  • 51
  • 5

1 Answers1

0

Your log will keep the messages in order of appearance.

A Logs Insights query will treat @timestamp as a text field.

The granularity is to the millisecond, so two lines written on the same millisecond will be treated by the query as equal values. Just like other fields with equal values will.

There will be other ways to parse your log and keep the items in order, but not within Logs Insights with data from log groups.

Lode
  • 13
  • 3