To view all the log files, below will be helpful
sudo docker ps -qa | sudo xargs docker inspect --format='{{.LogPath}}'
to view the log files with sizes, below will be helpful
sudo docker ps -qa | sudo xargs docker inspect --format='{{.LogPath}}' | sudo xargs ls -hl
The general format of viewing the log file is
docker inspect -f {{.LogPath}} $HERE_IS_YOUR_CONTAINER
to get the entire docker container ID, instead of truncated one, we need to use the below
docker ps --no-trunc
references:
https://forums.docker.com/t/docker-logging-driver-json-file-not-able-to-locate-json-log-file-where-the-logs-are-written/32256
No comments:
Post a Comment