sandreu/cake-sentry
Composer 安装命令:
composer require sandreu/cake-sentry
包简介
Sentry error handler plugin for CakePHP2
关键字:
README 文档
README
Cake-Sentry is an error handler plugged on Sentry - docs
Compatibility
This library is only compatible with CakePHP >= 2.8 and < 3.0. If you need support for CakePHP < 2.8 please use the 0.1.0 release of cake-sentry.
Installation
Note if you don't install from composer you will have to manually download the raven component and install it before proceeding to step 2.
- Install Sentry Plugin into your CakePHP project with composer :
// composer.json
// …
"require": {
// …
"sandreu/cake-sentry": "*"
},
// …
- Load the cake-sentry Plugin in your bootstrap.php :
CakePlugin::load('Sentry');
- Configure the error handler in your core.php :
App::uses('SentryErrorHandler', 'Sentry.Lib'); Configure::write('Sentry', array( 'production_only' => false, // true is default value -> no error in sentry when debug 'avoid_bot_scan_errors' => 'MissingController or MissingPlugin error message', // or false if you want Sentry to log MissingController and MissingPlugin Exceptions 'User' => array( 'model' => 'SpecialUser', // 'User' is default value 'email_field' => 'special_email' // default checks 'email' and 'mail' fields ), 'PHP' => array( 'server'=>'http://your-sentry-DSN-for-PHP' ), 'javascript' => array( 'server'=>'http://your-sentry-DSN-for-javascript' ) )); Configure::write('Error', array( 'handler' => 'SentryErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); Configure::write('Exception', array( 'handler' => 'SentryErrorHandler::handleException', 'renderer'=>'ExceptionRenderer' ));
- Use Sentry as logger :
CakeLog::config('default', array('engine' => 'Sentry.SentryLog'));
- include ravenjs and init script in the default layout :
<?php echo $this->Html->script('jquery'); echo $this->Html->script('ravenjs-min'); ?> <script type="text/javascript"> $(function () { <?php echo $this->element('Sentry.raven-js'); ?> }); </script>
sandreu/cake-sentry 适用场景与选型建议
sandreu/cake-sentry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40.37k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2014 年 12 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「log」 「exception」 「error」 「cakephp」 「sentry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sandreu/cake-sentry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sandreu/cake-sentry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sandreu/cake-sentry 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
Laravel 5.x.x library for integration Monolog Sentry
PHP Error Handler module that captures and displays all throwable errors in a given format, making debugging easier and more efficient
Pacote simplificado para persistência de logs
Collection of tools to use the full power of the Enyalius framework
Error and Exception override and observers.
统计信息
- 总下载量: 40.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2014-12-04