lazydocker
lazydocker copied to clipboard
No logs from random containers after updating to 0.19.0
Describe the bug I updated lazydocker on several pc/vm's and raspberry's and noticed when scrolling down several containers do not output any logs. docker compose logs -f or dozzle correctly display these. (Maybe related, but the installer script never worked properly for me, even when ran as root it ends up in home directory, so I usually run the script, then sudo mv ~/.local/bin/lazydocker /usr/local/bin)
To Reproduce Steps to reproduce the behavior:
- open lazydocker 0.19.0 on host with multiple containers running
- start scrolling down the list of containers
- look in the log window, some of the containers will show just blank window with no logs whatsoever
Expected behaviour Logs should display for all containers
Screenshots I can make a video if necessary, but I think it's pretty self-explanatory - you should see logs, there's nothing.
Desktop (please complete the following information):
- OS: Ubuntu 22.04.1 LTS
- Lazydocker Version 0.19.0
Additional context I tried to find out some connection between the containers that don't work, but came up empty. It's random containers each restart. I have tried running lazydocker as root, but no change. This is not a slow cpu issue either I can stay on the container for 5 minutes the logs will never show.
Same happens to me, running LazyDocker with docker:
docker run --rm -it -v //var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker
I subjectively feel it got even worse in 0.20.0, now it's about half or more of the containers displaying no logs in lazydocker.
Right you are @hugalafutro: as of v0.20.0 we only show the last hour of logs for a given container (see commit here: https://github.com/jesseduffield/lazydocker/commit/0b7017150c7cf0534c71203a53c2ff0f608e459c).
This is configurable: you can set:
logs:
since: ''
in your config to un-set the 'since' value that gets passed to docker logs
.
The motivation behind that was that if a container has millions of lines of logs from being up for a long time, it was very painful to wait for all those logs to be produced so that you could get to the end.
But if that default is causing issues I wanna find a better solution. One approach would be to have a default value for the 'tail' arg of something like 1000 so that it only loads those lines and then it continues from there. But even 1000 takes a while to load for some containers I'm testing that on.
Something we could do is a similar approach to k9s which shows you the args within the app and provides keybindings for you to change them.
I've got a WIP PR up for making this stuff visible and configurable from within the app https://github.com/jesseduffield/lazydocker/pull/406
Thanks, I was not aware of this, it is actually an useful feature, I have containers that keep logs for months and it took like 10mins for it to scroll to the end on raspberry pi.
I was just taken aback by the blank screen that to me looked like bug, perhaps a line of text in such a case explaining that no logs have been produced in last hour could be useful, although in that case I would possibly still be interested in seeing the tail end of the last log instead of nothing.
I wouldn't say the defaults cause issues, it's just not readily apparent they changed and why in some cases there's no log (I presume large portion of user base doesn't read changelogs, I too am guilty of this at times - at other times I try, but it's hard when the log is long-ish and 90% of issues fixed/features introduced usually do not apply to my use case).
I'll be happy with whatever approach you'll choose as now that I know no logs means all's well it won't bother me that much.