Integrate docker container logs?


Author
Message
LogViewPlus Support
LogViewPlus Support
Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)
Group: Moderators
Posts: 1.3K, Visits: 4.6K
Thanks for the update Daniel.

This is something we will need to investigate further as we consider an approach for docker / kubernetes.  I think these kinds of workarounds have been applied by other users in the past with mixed results.  What is needed here is a more comprehensive solution.

Thanks again,

Toby
Daniel M.
Daniel M.
Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)
Group: Forum Members
Posts: 20, Visits: 55
Thanks for considering this.

Just some insights: I tinkered around yesterday.
First, I tried serving the "docker logs ..." output as TCP and added it as a TCP log source in LogView.
However, while the TCP endpoint served well, LogView had several issues working with that.
For one, it had issues parsing the logstash JSON, because the stream started in the middle of a JSON object.
Then it stopped working completely. Transfer logs looked fine, but LogView seemingly did not receive anything anmore.
Further, I couldn't figure out how to assign an existing parser. The parsers only have file name patterns, but it seems they do not apply to other log source types.

Then I found out that docker itself already writes these logs to file. Docker's default logging driver is "json-file". It already writes every stdout/stderr line to a file. But these are located inside of the docker environment and are wrapped into an outer json format
{"log":"{\"level\":\"INFO\",\"msg\":\"...\"}\n","stream":"stdout","time":"2026-07-21T10:00:00.123456789Z"}


Lastly, instead of serving "docker logs..." as TCP, I just let the output write to files and simply watch the according directory in LogView.
Interestingly, this workaround seems to be the most robust for now, even though I don't like the overhead of having to redirect everything to file.

LogViewPlus Support
LogViewPlus Support
Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)Supreme Being (16K reputation)
Group: Moderators
Posts: 1.3K, Visits: 4.6K
Hi Daniel,

Thanks for the suggestion.

I think there is tremendous value that we can add by moving in this direction - and a lot of people could potentially benefit.  Virtualized environments, such as docker and kubernetes, can be very difficult to manage.  Being able to easily navigate and view the logs would be a big help. 

This is something we are considering, but we haven't yet settled on an approach.  I think this kind of functionality would make a great LogViewPlus 4.0, but it's difficult for me to put a timeline on that at the moment.

Thanks again,

Toby
Daniel M.
Daniel M.
Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)Junior Member (98 reputation)
Group: Forum Members
Posts: 20, Visits: 55
Hi,
I was wondering if there is already a way to integrate docker container logs?
i.e. Logs pushed by docker containers to their Std Out/err.
Basically the data from
docker logs --follow my-container
See https://docs.docker.com/reference/cli/docker/container/logs/

The issue is that the Application, which I am developing with, shifted towards Kubernetes. Thus, for local development setups it now uses a whole lot of composed Docker containers, which do not write logs to file anymore but write to Std Out/Err.
Currently, I use Dozzle to get a view on the logs from my Docker setup. However, this is less than ideal.

What I would really love is if I could -tail LogView Plus on "docker logs --follow my-container" or something alike.
Tags
Edited 5 days ago @ 10:24 AM by Daniel M.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search