Skip to content

Instantly share code, notes, and snippets.

@brianr
Created March 15, 2013 20:29
Show Gist options
  • Save brianr/5172895 to your computer and use it in GitHub Desktop.
Save brianr/5172895 to your computer and use it in GitHub Desktop.
<?php
require_once('rollbar.php');
class EchoLogger {
public function log($level, $message) {
echo "[Rollbar] $level $message\n";
}
}
$config = array(
'access_token' => 'aaaabbbbccccddddeeeeffff00001111',
'base_api_url' => 'http://api.rollbar.com/api/1/',
'environment' => 'test',
'root' => '/Users/brian/testrollbar',
'logger' => new EchoLogger()
);
Rollbar::init($config);
try {
throw new Exception("hello");
} catch (Exception $e) {
Rollbar::report_exception($e);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment