moriony/silex-sentry-provider
最新稳定版本:2.0.0
Composer 安装命令:
composer require moriony/silex-sentry-provider
包简介
Sentry service provider for the Silex framwork.
关键字:
README 文档
README
Sentry client service provider for the Silex framwork.
Install via composer
Add in your composer.json the require entry for this library.
{
"require": {
"moriony/silex-sentry-provider": "~2.0.0"
}
}
and run composer install (or update) to download all files.
If you don't need development libraries, use composer install --no-dev or composer update --no-dev
Usage
Service registration
$app->register(new Moriony\Silex\Provider\SentryServiceProvider, array( 'sentry.options' => array( 'dsn' => 'http://public:secret@example.com/1', // ... and other sentry options ) ));
Here you can find other sentry options.
Exception capturing
$app->error(function (\Exception $e, $code) use($app) { // ... $client = $app['sentry']; $client->captureException($e); // ... });
Error handler registration
Yoc can install error handlers and shutdown function to catch fatal errors
// ... $errorHandler = $app['sentry.error_handler']; $errorHandler->registerExceptionHandler(); $errorHandler->registerErrorHandler(); $errorHandler->registerShutdownFunction(); // ...
Resources
统计信息
- 总下载量: 72.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-06-17