uwsgi logrotate not working

纵饮孤独 提交于 2019-12-11 20:26:28

问题


I have set up the configuration file for uwsgi logrotate. When I tested it, it seemed it will work.

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

But the cron job was executed and nothing happened. What could be wrong? My entry is

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

In cron log I can see

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

Can I get more details about "what happened" somewhere - a detailed output of the logrotate job?


回答1:


I tried adding

missingok

and that seems to have worked.



来源:https://stackoverflow.com/questions/20510174/uwsgi-logrotate-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!