承接 moriony/silex-sentry-provider 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

moriony/silex-sentry-provider

最新稳定版本:2.0.0

Composer 安装命令:

composer require moriony/silex-sentry-provider

包简介

Sentry service provider for the Silex framwork.

README 文档

README

Code Climate Test Coverage Total Downloads Latest Stable Version License

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

统计信息

  • 总下载量: 73.63k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 5
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-17