PHP code example of mindscapehq / raygun-cake

1. Go to this page and download the library: Download mindscapehq/raygun-cake 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/ */

    

mindscapehq / raygun-cake example snippets



// Include our awesome error catcher..
CakePlugin::load('RaygunCake');
Configure::write('RaygunCake.apiKey', '<API KEY>');
// Optional: Send your application's version number
Configure::write('RaygunCake.version', '1.2.3.4');
// Optional: Filter out sensitive parameters before logging to Raygun
Configure::write('RaygunCake.filterParams', array('password' => true));
App::uses('RaygunError', 'RaygunCake.Lib');


Configure::write('Error', array(
  'handler' => 'RaygunError::handleError',
  'level' => E_ALL & ~E_DEPRECATED,
  'trace' => true
));

Configure::write('Exception', array(
  'handler' => 'RaygunError::handleException',
  'renderer' => 'ExceptionRenderer',
  'log' => true
));


// Only the first 2 arguments are NING,
  "Generic Description",
  $file, $line, $tags,
  $userCustomData, $timestamp
);


// Only the first argument is 
  $exception, $tags,
  $userCustomData, $timestamp
);