【问题标题】:uwsgi logrotate not workinguwsgi logrotate 不工作
【发布时间】:2013-12-28 21:31:35
【问题描述】:

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

【问题讨论】:

    标签: cron centos uwsgi logrotate


    【解决方案1】:

    我尝试添加

    missingok
    

    这似乎奏效了。

    【讨论】:

      猜你喜欢
      • 2017-08-07
      • 2021-10-13
      • 2019-03-02
      • 2018-06-01
      • 2020-06-14
      • 1970-01-01
      • 1970-01-01
      • 2016-01-29
      • 2014-07-12
      相关资源
      最近更新 更多