
Describe the bug
When entering the log view, the screen loads and then quickly scrolls through all the results, which can take some time if there are a lot of logs. Prior versions would just pop into the screen at the end and allow you to scroll back up.
To Reproduce
Run a pod with a lot of log output. View the pod logs in k9s.
Expected behavior
The screen should fairly quickly at the bottom and allow scrolling backwards.
Versions (please complete the following information):
Additional context
I retested this in 0.21.3 and it does not have this behavior. Seems new to 0.22.0
@longwa Thank you for this issue! I did make some changes in the log view. Could you share what your logs setting is in $HOME/.k9s/config?
Here is my logger: block
logger:
tail: 100
buffer: 5000
sinceSeconds: -1
fullScreenLogs: false
textWrap: false
showTime: false
I haven't changed the configuration since prior versions.
@longwa Try setting sinceSeconds to 60 does this makes a difference??
That worked for me
@derailed Yes, of course that would work but that doesn't seem to actually fix the problem just work around it. In previous versions, the amount of buffer available to display didn't affect this behavior.
It seems like the real fix is to render the initial view at the end of the buffer regardless of the size.
@longwa Hum... I went back and tried v0.21.3 as you've suggested and compared with v0.22.1 and not seeing any difference viewing chatty pod ie the screen still scrolls. I did do some perf optimizations for logs since v0.21.3 but the logic to display the logs is the same. What am I missing?
Hmmm, you know I went back and tried it again and it seemed to do the same thing in the 21.7 as well. I swear it wasn't doing that before but maybe something has changed in iTerm2 or something on the Mac that's making it more obvious.
Well, I guess the next question is, can it not do that, lol? Is there any way to just start the display at the bottom of the buffer regardless of the size of the buffer. I assume you are getting the scrolling behavior right?
@longwa I just updated from 0.21.2 to 0.22.1 and I faced the same issue. Really annoying, basically unusable for me to check logs.
@Tschis Thanks for the feedback Rodolfo. I think I am confused here and not seeing what the issue is. From my point of view, the current k9s logs output is the same as one would when running the following command:
kubectl logs -f --tail 100 my pod
So I am confused on where this feature is deemed unusable?? I could totally be missing it here and would love to resolve this. So could you add more details here ie screen shot or better yet an animation so I can see what this issue is and what is expected? Also is this an issue where the pods "had" a lot of logs or is it a combo of there are lots of logs and also lots of incoming logs ie the pod(s) are hot?? I've tested either case but fail to see where the issue is. Also please share your k9s logs configuration so we can track this down. Tx!!
@derailed Maybe tomorrow I can post more infos, but for now I can tell you that the behavior changed.
Before I would open the logs and the buffer would just be at the recent logs and keep scrolling.
Now the logs start like multiple minutes before, and have to basically println very fast everything that happened until current, so not only does it take extra "unnecessary time", if there are lots of logs being added currently then it can take more than a minute for it to catch up to current -> "unusable" might be too harsh, but I meant I lose a lot of time waiting for something that I didn't have to wait before, most of the time if I am debugging I just care about the latest logs, not the whole history from previous 30 minutes
My config is default, I am not at work so I can not post it, but I never touched it until I saw this thread and updated the sinceSeconds: -1 to 10, and that seems to help, but I would prefer to not modify default configs
I've been having the same problem for the past few versions, compared to the previous functionality it greatly increases the difficulty of checking logs. Like @Tschis, I previously observed the k9s log view starting at the most recent logs, but now it starts at the beginning and very quickly scrolls through, and for certain services it can take several minutes to get to the most recent logs.
I have the same problem for several weeks. I can't tell you which was the last working version, but it's getting on my nerves so much that I ended up here. Would appreciate if it would work as before, starting at the bottom with the most recent logs.
@edobry @longwa @limod @kevinnoel-be. Let's see if we're happier with v0.23.1
Feels good again on v0.23.4
Thanks @derailed
seconded, this is working MUCH better! Thank you @derailed , massive UX improvement 馃帀
@Tschis @edobry Thank you both for reporting back and for your kind words!! Sure can use a bit of an uplift this week ;(
The behavior is better, but when I choose All it doesn't seem to provide the full scroll back anymore, is that by design?
logger:
tail: 100
buffer: 5000
sinceSeconds: -1
fullScreenLogs: false
textWrap: false
showTime: false
@longwa Correct! Your current logger configuration will retrieve the last 100 lines of log for each containers. This is currently the default. If by full scroll back, you mean going back further back in time in the logs? Then you will need to change the default to display more log lines. Careful there tho as logs are indeed expensive! Does this make sense?