0

我已经为 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 作业的详细输出吗?

4

1 回答 1

1

我尝试添加

missingok

这似乎奏效了。

于 2013-12-12T03:33:57.220 回答