We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have set up email logging for everything except 404 errors (since these would be far too common). However, I just got an e-mail with such a log.
This is the configuration in the app's params:
'components.log' => [ 'traceLevel' => 0, 'targets' => [ 'file' => [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], 'email' => [ 'class' => 'yii\log\EmailTarget', 'except' => ['yii\web\HttpException\404'], 'levels' => ['error', 'warning'], 'message' => ['from' => 'webmaster@mydomain.com', 'to' => 'webmaster@mydomain.com'], ], ], ]
This is the e-mail I got (apparently some random bot snooping around for a non-existing admin/config.php file):
admin/config.php
2013/12/08 21:52:44 [24.11.249.140] [error] [yii\web\HttpException:404] exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "admin/config.php".' in /var/www/vendor/yiisoft/yii2/yii/base/Module.php:590 Stack trace: #0 /var/www/vendor/yiisoft/yii2/yii/web/Application.php(77): yii\base\Module->runAction('admin/config.ph...', Array) #1 /var/www/vendor/yiisoft/yii2/yii/base/Application.php(289): yii\web\Application->handleRequest(Object(yii\web\Request)) #2 /var/www/backend/web/index.php(25): yii\base\Application->run() #3 {main} Next exception 'yii\web\NotFoundHttpException' with message 'Unable to resolve the request "admin/config.php".' in /var/www/vendor/yiisoft/yii2/yii/web/Application.php:88 Stack trace: #0 /var/www/vendor/yiisoft/yii2/yii/base/Application.php(289): yii\web\Application->handleRequest(Object(yii\web\Request)) #1 /var/www/backend/web/index.php(25): yii\base\Application->run() #2 {main} 2013/12/08 21:52:44 [24.11.249.140] [error] [yii\i18n\PhpMessageSource::loadMessages] The message file for category 'app' does not exist: /var/www/common/messages/en-US/app.php 2013/12/08 21:52:44 [24.11.249.140] [info] [application] $_SESSION = array ( '__flash' => array ( ), )
The text was updated successfully, but these errors were encountered:
except should set as ['yii\web\HttpException:404'] instead ['yii\web\HttpException\404'].
except
['yii\web\HttpException:404']
['yii\web\HttpException\404']
Sorry, something went wrong.
No branches or pull requests
I have set up email logging for everything except 404 errors (since these would be far too common). However, I just got an e-mail with such a log.
This is the configuration in the app's params:
This is the e-mail I got (apparently some random bot snooping around for a non-existing
admin/config.php
file):The text was updated successfully, but these errors were encountered: