2017 © Pedro Peláez
 

library yii-google-cloud-error-reporting

image

silverback/yii-google-cloud-error-reporting

  • Thursday, July 5, 2018
  • by brandomeniconi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii 1.x - Google Cloud (Stackdriver) Monitoring

Installation

Clone this repository in protected/extensions/yii-stackdriver., (*1)

Launch a composer update to download required dependencies., (*2)

Config

Add the log route to CLogRouter to pipe logs in Google Cloud Logging., (*3)


'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'ext.yii-stackdriver.StackdriverLogRoute', 'levels'=>'error, warning, info, profile, debug', // override error severity for some exceptions 'errorSeverity' => array( 'exception.CHttpException.404' => 'info', ) ), ... ) )

Customize the class for error handling in config., (*4)

'errorHandler'=>array(
    // use 'site/error' action to display errors
    'class'=>'ext.yii-stackdriver.StackdriverErrorHandler',
    'errorAction'=>'site/error',

    // do not consider 404 as errors/exceptions
    'skip404' => true,
),

Authorize the GCE VM service account with the following privileges:, (*5)

  • Error Reporting Author
  • Logs Author

The Versions