Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Log Rotation of Docker logs not working properly

$
0
0

enter image description hereI applied docker - Log rotation by creating a file in /etc/logrotate.d folder. Content of the file is like this:

/var/lib/docker/containers/*/*.log {        daily        missingok        rotate 5        compress        delaycompress        notifempty        copytruncate        create 0640 root root}

I applied this file by command:- sudo logrotate -f /etc/logrotate.d/appNow,The log files even get rotated, but I cannot see live logs in docker logs command. Help me with Logrotation of docker logs in.enter image description here

I tried:

/var/lib/docker/containers/*/*.log {        daily        missingok        rotate 5        compress        delaycompress        notifempty        copytruncate        create 0640 root root}

I am expecting that my docker logs get rotated but as well as I should be able to see live docker logs by my command docker logs --tail 100 -f service_name


Viewing all articles
Browse latest Browse all 5956

Trending Articles