dev-master
9999999-devAfterBug error monitoring for PHP applications.
MIT
The Requires
by Alfa Adhitya
Wallogit.com
2017 © Pedro Peláez
AfterBug error monitoring for PHP applications.
This library detects errors and exceptions in your PHP application and reports them to AfterBug for alerts and reporting., (*2)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
composer require afterbug/afterbug "~1.0"
Add afterbug/afterbug to your composer.json, (*5)
"afterbug/afterbug": "~1.0"
$afterbug = AfterBug\Client::make('AFTERBUG_API_KEY')
// Register AfterBug error handler
AfterBug\Exceptions\ErrorHandler::register($afterbug);
// will be reported by the exception handler
throw new \Exception('testing exception handler');
Sets for which exception classes we should not send to AfterBug., (*6)
$afterbug->registerCallback(function ($config) {
$config->setExcludeExceptions(['Namespace\ExceptionClass']);
});
Set a callback to customize the data., (*7)
$afterbug->registerCallback(function ($config) {
$config->setEnvironment('Production')
->setUser([
'id' => 1,
'name' => 'Alfa'
])
->setMetaData([
'custom' => 'Your custom data'
]);
});
Other packages exists to integrate this SDK into the most common frameworks., (*8)
The following integrations are supported by AfterBug team., (*9)
AfterBug error monitoring for PHP applications.
MIT