I have setup docker swarm with 4 machines and running the stack using yml file. I am trying to setup log rotation but doesn’t seem to be working.
I have done 2 thingsto make it rotate but both are not working.
Conf2: /etc/logrotate.d/docker -->
The second config created log rotation file with dateformat attached at end of the file but not based on size.
One more thing i noticed is when the stack was removed the container logs are getting removed. Do we have any way to keep the logs even if we remove the swarm stack or container ?
It will be great if someone can help on configuring rotating the docker logs.