PHP code example of yatshub / yii2-google-cloud-error-reporting
1. Go to this page and download the library: Download yatshub/yii2-google-cloud-error-reporting library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yatshub / yii2-google-cloud-error-reporting example snippets
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
...
'googleCloudErrorReporting' => [
'class' => 'yatshub\GoogleErrorReporting\ErrorReporting',
'levels' => ['error', 'warning'],
'except' => ['yii\web\HttpException:404'],
'projectId' => 'project-id',
'loggerInstance' => 'instance-log',
'clientSecretPath' => 'path/to/your/service/account/credentials.json',
'version' => 'dev or prod',
'service' => 'application name or any name for easy project tracking',
],
...
],
],
php composer.phar
"yatshub/yii2-google-cloud-error-reporting": "*"