PHP code example of mead-steve / ray-gunolog
1. Go to this page and download the library: Download mead-steve/ray-gunolog 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/ */
mead-steve / ray-gunolog example snippets
$logger = new Monolog\Logger("Example");
$rayGunHandler = new \MeadSteve\RayGunolog\RayGunHandler(
new \Raygun4php\RaygunClient("YOUR_RAYGUN_KEY")
);
$logger->pushHandler($rayGunHandler);
// The following error will get sent automatically to RayGun
$logger->addError("oh no!", array('exception' => new \Exception("ohnoception")));