如何在 LAMP 服务器命令行中为我的 codeigniter 应用程序创建新的日志轮换文件。我想运行这个日常流程
日志文件将是这样的
application/logs/log-2013-06-12.php
application/logs/log-2013-06-13.php
application/logs/log-2013-06-14.php
application/logs/log-2013-06-15.php
这是我的日志轮换脚本,如果有任何错误请告诉我
/var/www/my-app/application/logs/*.php{
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 640 root password
sharedscripts
dateext
dateformat -web01-%Y-%m-%d-%s
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi; \
endscript
}