gpt4 book ai didi

cron - uwsgi logrotate 不工作

转载 作者:行者123 更新时间:2023-12-04 19:38:21 25 4
gpt4 key购买 nike

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

最佳答案

我尝试添加

missingok

这似乎奏效了。

关于cron - uwsgi logrotate 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20510174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com