Avoid recording errors and debug logs on CakePHP 2

让人想犯罪 __ 提交于 2019-12-02 05:49:11

The actual solution is to fix the errors and remove the debugging statements so that nothing would be written in the logs. To answer the question literally, you can configure the error handler to not log anything in core.php:

Configure::write('Error', array(
    'handler' => 'ErrorHandler::handleError',
    'level' => 0,
    'trace' => false
));

Or, since you're running a cron job every 2 minutes anyway, delete the logs at the same time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!