kits-ab / LogLady

Log file viewer
https://loglady.dev/
MIT License
8 stars 0 forks source link

Bug/backend returning wrong content #522 #533

Closed MelindaSW closed 4 years ago

MelindaSW commented 4 years ago

Previously: Content could be returned like this, skipping a huge part of the file if the cache contained lines from vastly different parts of the file: image

The lines at the end of the file sometimes looked like this image Or this image Or the end was not really the end And there were a variating amount of empty lines after the loglines ended.

Now: image The last line should have no empty lines after it. When following tail the new lines appear at the bottom instead of over the empty lines, if they are there. And the returned lines does not contain different parts of the file.

Other fixes:

I tried to refactor as best as I could, though I feel that this is not the prettiest code I have written. At least it seems to work:) Please tell me if anything looks weird, or suggest changes. Over all I feel that the behavior has improved. Let me know what you think!