Wizard Wizard - 1 year ago 195
PHP Question

Yii log skip 404 errors

Maybe exist solution to skip 404 exceptions ? I'mean not store this messages in log file ?

2015/04/09 12:28:52 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Невозможно обработать запрос "offer/downloadOffer".' in /var/www/yii/framework/web/CWebApplication.php:286
Stack trace:
#0 /var/www/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('offer/downloadO...')
#1 /var/www/yii/framework/base/CApplication.php(184): CWebApplication->processRequest()
#2 /var/www/LAP/www/index.php(16): CApplication->run()
#3 {main}

Answer Source

Solution is exclude categories.

'class' => 'CFileLogRoute',
'categories' => '!exception.CHttpException.404'
'class' => 'CEmailLogRoute',
'categories' => '!exception.CHttpException.*'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download