websupport/yii-sentry
最新稳定版本:v1.0.0
Composer 安装命令:
composer require websupport/yii-sentry
包简介
Layer for Yii framework for communication with Sentry logging API
README 文档
README
Logging Extension for Yii framework for communication with Sentry logging API
Installation
Yii Sentry is composer library so you can install the latest version with:
composer require websupport/yii-sentry
Configuration
Add following to your application's config:
PHP error reporting
'components' => [ 'log' => [ 'class' => \CLogRouter::class, 'routes' => [ // your other log routers array( 'class' => \Websupport\YiiSentry\LogRoute::class, 'levels' => E_ALL, 'enabled' => !YII_DEBUG, ], ], ], 'sentry' => [ 'class' => \Websupport\YiiSentry\Client::class, 'dsn' => '', // Your's DSN from Sentry ], )
JS error reporting
'preload' => ['sentry'], 'components' => [ 'sentry' => [ 'class' => \Websupport\YiiSentry\Client::class, 'jsDsn' => '', // Your's DSN from Sentry ], ]
Sending user context to JS
\Websupport\YiiSentry\Client component has public method: setJsUserContext($context) which will send $context to Raven JS instance.
You can call this method multiple times from any part of the system. Recommended way however is to use it in CWebUser class right after init.
统计信息
- 总下载量: 19.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-07-30