# Docker logging *.* { /var/log/docker.log stop }3. Configure logrotate to roll and archive these files by creating file: /etc/logrotate.d/docker 4. Put the following contents into file /etc/logrotate.d/docker:
/var/log/docker.log { size 100M rotate 2 missingok compress }5. Finally, restart rsyslog:
service rsyslog restartAfter all above steps, the CDSW logging should be redirected to /var/log/docker.log, no restart of CDSW is required. Note: this blog was based on steps from Mark Wolfe’s Blog. The difference is that instead of “daemon.*” in step 2, I need to use “*.*“, otherwise only kubernete log will go into /var/log/docker.log, not dockerd logs.