配置好了 logrotate 日志文件
/var/www/rails_app/log/*.log {
weekly
rotate 4
size 100M
compress
missingok
notifempty
copytruncate
}
当我手动执行一次 logrotate -vf /var/www/rails_app/log/*.log
的时候,直接报告
error: file /var/www/rails_app/log/production.log too large, probably not a config file.
removing last 0 log configs
而我的 production.log 文件大小为
# 文件路径为 /var/www/rails_app/log
total 136M
drwxr-xr-x 2 root root 4.0K May 8 18:46 ./
drwxr-xr-x 13 root root 4.0K Mar 10 17:31 ../
-rw-r--r-- 1 root root 0 Dec 5 10:37 .keep
-rw-r--r-- 1 root root 30M May 8 18:28 production.log
-rw-r--r-- 1 root root 107M May 8 18:06 sidekiq.log
请问是我缺少什么配置吗?还是版本问题?
root@xxx:/var/www/rails_app/log# logrotate -v
logrotate 3.7.8 - Copyright (C) 1995-2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License
...