문제

How do I limit the log size when using CakeLog? I am using Ubuntu, if that makes a difference.

도움이 되었습니까?

해결책

Use logrotate, which is included in Ubuntu. Create a file in /etc/logrotate.d named something like cakelogs. An example which would rotate and compress all *.log files in all Cake tmp/logs directories would look like this:

/var/www/*/public/tmp/logs/*.log {
    weekly
    missingok
    rotate 52
    compress
    dateext
    delaycompress
    notifempty
    create 640 www-data www-data
    sharedscripts
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top