How to check all logs when using log rotate

I’m using the basic log rotate, for Docker, linux:

--log-driver json-file \
--log-opt max-size=10m \
--log-opt max-file=5 \
--name storagenode storjlabs/storagenode:latest \

I get that it creates 5 files of 10MiB each. When I use the command:

docker logs storagenode

or

docker logs storagenode -f 2>&1

I get the last file, I think, because it prints only a part of the logs. I don’t get the startup entries. It’s on info level, and node runs from 130h. I use the custom level to ingnore the pieces in and outs. I don’t believe it already reached 50MiB.
How can I check all 5 files and how can I check the size of each file, just to be sure it uses those settings?
Or it’s just a dislay limitation in linux? Maybe it shows only the last x lines?

Would something like this work (I’m not sure!):

  1. get container id using docker ps
  2. go to /var/lib/docker/{container_id}/
  3. see if log is as you specify
1 Like

I’m on Synology. Can’t find the docker dir there.

What about this: sudo docker info | grep -i "docker root dir"

You may use this command to reveal logs location for the container: