Kittyfisto / Tailviewer

Open source log file viewer
https://kittyfisto.github.io/Tailviewer/
MIT License
186 stars 38 forks source link

Tailviewer may display the same log line multiple times in rare cases #221

Closed Kittyfisto closed 4 years ago

Kittyfisto commented 4 years ago

Current behaviour

Under rare circumstances, see below, tailviewer will display certain lines of a log file multiple times in succession. This can appear in various patterns, for example (N, N, N+1, N+2, etc..) or (N, N+1, N, N+1, N+2, etc...).

Expected behaviour

Tailviewer should not artificially duplicate lines and display them as they are in the origin log file.

Steps to reproduce the problem

  1. Create an empty log file
  2. Open the log file in tailviewer
  3. Open the log file in a text editor
  4. Write some lines to the file in the text editor and hit save
  5. Continue the last line written, then add at least two more lines, then hit save
  6. Tailviewer will display the line which was continued in step 5 twice

Workaround

Whenever this problem occurs, changing any filter of the log file will cause the problem to disappear. For example simply toggling (enabling/disabling or vice versa) any non-empty filter will make this problem go away.

Kittyfisto commented 4 years ago

This problem currently only occurs when all of the following conditions are met:

It is a very rare occurrence so far and has been reported by one colleague so far.

The problem itself is caused by a bug in the FilteredLogFile class and should be able to be solved there.

Kittyfisto commented 4 years ago

Fixed with v0.9.0

AdrianEggenberger commented 1 year ago

I have seen this behavior today in release 1.00 RC1. All the criteria from above seem to be given in my case. I have an application that writes log4net data to a text file. The Tailviewer is used to visualize the content with an active filter enabled.

In the duplicated lines even the line number is duplicated.