LogViewPlus Support

Maintain order of log entries for custom parser

https://www.logviewplus.com/forum/Topic1002.aspx

By AndreasP - 21 May 2021

Hi Toby,

I have written a custom parser for my log files.

I now have a log file where the time was changed 10 minutes back during the log.  When I load the log with the custom parser the "original" order of log entries is not preserved, that is I now have 10 minutes "overlapping" log entries instead of seeing that the time was changed.

Is it somehow possible to maintain the "original" log entry order?

Regards
Andreas
By LogViewPlus Support - 21 May 2021

Hi Andreas,

Thanks for reporting this issue.  I assume the time change was made through the "Time Offset" dialog (not internally by your parser).

This sounds like it might be a bug, but I am having trouble recreating it locally.  I have just tried to recreate using the sample custom parser and the order of the log entries looks correct.  Are you able to provide any more detail?


As a temporary solution, you can try explicitly sorting by log line number.

Thanks,

Toby
By AndreasP - 21 May 2021

Hi Toby,

no the time change is in the log files itself. I did not use the "Time Offset" Dialog.

Example Log File:
09:40 Log Entry 
09:50 Log Entry
09:52 Log Entry
09:42 Log Entry <- Here the system time has been changed back
09:45 Log Entry

Yes, sorting by log line number is a workaround.

Regards
Andreas
By LogViewPlus Support - 21 May 2021

Can you please confirm that the "After initial load, sort log entries..." setting is not enabled?



There are situations where sorting should be applied (merge files for example), but the file should normally be loaded as written.

Hope that helps,

Toby
By AndreasP - 21 May 2021

Hi Toby,

this setting was activated. After deselecting, the log entries are in correct order.

Does this setting only influence single log files? Or does it also influence the merging of log files?

Regards
Andreas
By LogViewPlus Support - 21 May 2021

Glad that helped.

This setting impacts all 'single' log files opened directly by LogViewPlus.  Merge files will always be sorted on load.

Toby