From 731ab191c022a188e952be33f66017ac8f6469d7 Mon Sep 17 00:00:00 2001 From: Soumen Date: Wed, 18 Nov 2015 17:37:29 +0000 Subject: [PATCH 1/2] Added missingok flag in the config. Changed maxsize to size Changed maxsize to size as we can see that maxsize was not having an effect on log rotation and we were getting logs above 100M per container before any rotation can actually hit. I have seen through the manual and can find that maxsize attribute has been added in later version of logrotate. The logrotate version this has been tested against it 3.8.8 --- logrotate.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/logrotate.conf b/logrotate.conf index 005de07..09853fb 100644 --- a/logrotate.conf +++ b/logrotate.conf @@ -1,9 +1,10 @@ /var/lib/docker/containers/*/*.log { + missingok rotate 0 copytruncate sharedscripts - maxsize 10M + size 10M postrotate rm -f /var/lib/docker/containers/*/*.log.* endscript -} \ No newline at end of file +} From 29f4ec8689d9f36eeb366f59cb4f335336bc8b9f Mon Sep 17 00:00:00 2001 From: Soumen Date: Fri, 20 Nov 2015 11:51:42 +0000 Subject: [PATCH 2/2] Update logrotate.conf