drewjoh/sentry
Composer 安装命令:
composer require drewjoh/sentry
包简介
A PHP wrapper for Sentry
README 文档
README
This is a simple wrapper class for the raven-php experimental PHP client for Sentry.
I prefer the use of simple static methods throughout my app for things like logging. This wrapper makes that workable, instead of having to make an instance of the client when you need it.
Usage
// Setup our class, with optional persistent tags
Sentry::setDSN('{YOUR_DSN}', array('php_version' => phpversion()) );
// Capture a message
$event_id = Sentry::captureMessage('my log message');
// Capture an exception
$event_id = Sentry::captureException($exception);
// Capture with one time use tags
Sentry::tags(array('test_tag' => 'true'));
Sentry::captureMessage('Test message 3 from Sentry class');
// Give the user feedback
echo "Sorry, there was an error! Your reference ID is " . $event_id;
Installation
Install with Composer
If you're using Composer to manage dependencies, you can add Raven with it.
{
"require": {
"drewjoh/Sentry": ">=0.1.0"
}
}
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2012-10-26