uwsgi logrotate不工作

时间:2013-12-11 03:50:38

标签: cron centos uwsgi logrotate

我已经为uwsgi logrotate设置了配置文件。当我测试它时,似乎它会起作用。

logrotate -dvf /etc/logrotate.d/uwsgi 
reading config file /etc/logrotate.d/uwsgi
reading config info for "/var/log/uwsgi/*.log" 

Handling 1 logs

rotating pattern: "/var/log/uwsgi/*.log"  forced from command line (5 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/uwsgi/uwsgi.log
  log needs rotating
rotating log /var/log/uwsgi/uwsgi.log, log->rotateCount is 5
dateext suffix '-20131211'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
copying /var/log/uwsgi/uwsgi.log to /var/log/uwsgi/uwsgi.log-20131211
truncating /var/log/uwsgi/uwsgi.log
compressing log with: /bin/gzip

但是cron工作已经执行,没有任何反应。可能有什么不对?我的参赛作品是

"/var/log/uwsgi/*.log" {
    copytruncate
    daily
    dateext
    rotate 5
    compress
    }

在cron日志中,我可以看到

Dec 11 03:45:01 myhost run-parts(/etc/cron.daily)[930]: finished logrotate

我可以获得更多有关“发生了什么”的详细信息 - logrotate作业的详细输出吗?

1 个答案:

答案 0 :(得分:1)

我尝试添加

missingok

这似乎有效。

相关问题