Closed chirino closed 2 days ago
I'm still on it, need more time
Rebased and applied your suggestions. I'll be able to look into this more next week.
Fixed the linter warnings. Let me know if there are any other bits you want adjusted.
the test coverage decreased significantly, I can help with tests here
The latest changes don't work for me.
make run
commit 88a3750859b5421ad95585ed6fcd894f8134f01f
That break is fixed now.
Maybe I got a little carried away. It would have been better if this was done over several commits. Feel free to cherry-pick ideas from this PR if you like any of its features.
The main reason I started down this path was that I expected
docker logs XXX -f | jlv
to behave similarly totail -f
with lo events just showing up as they occurred. With this PR, stdin input is displayed instantly. The log table now has a follow mode which is turned off once you navigate away from the latest log entry so the log entries will stop scrolling past the window.While at it I noticed that we could optimize memory use by NOT holding log line data in memory. We just need an offset, and length pair for each long line. When the log is displayed we just load it back from the file. Maybe we should increase the default MAX file size setting? Might need some testing to figure out a better default.
If you have a fast log stream, it might be hard to get back into follow mode by pressing the up key enough times to go past the first item, so Home/End key support was added.
And while at it, I reversed log file order and option. pressing r will toggle.
With so many new options, and mode, I added support for long help display. Press ? to show the more advanced key binds.