Skip to content

artlantis/raven-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raven-php

raven-php is an experimental PHP client for Sentry.

// Register the autoloader
require('/path/to/Raven/Autoloader.php');
Raven_Autoloader::register();

// Instantiate a new client with a compatible DSN
$client = new Raven_Client('http://public:[email protected]/1');

// Capture a message
$event_id = $client->getIdent($client->captureMessage('my log message'));

// Capture an exception
$event_id = $client->getIdent($client->captureException($ex));

// Give the user feedback
echo "Sorry, there was an error!";
echo "Your reference ID is " . $event_id;

// Install error handlers
$error_handler = new Raven_ErrorHandler($client);
set_error_handler(array($error_handler, 'handleError');
set_exception_handler(array($error_handler, 'handleException'));

Resources

About

Raven is a PHP client for Sentry (getsentry.com)

Resources

License

Stars

Watchers

Forks

Packages

No packages published