core-tech/fuel-packages-sentry 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

core-tech/fuel-packages-sentry

Composer 安装命令:

composer require core-tech/fuel-packages-sentry

包简介

README 文档

README

Sentry is a realtime event logging. This package corresponds to PHP and Javascript.

Install

Setup to fuel/packages/sentry

If you use git submodule or download zip, you must install vendors

$ cd fuel/packages/sentry
$ php composer.phar install

Configuration

In app/config/config.php

'always_load' => array('packages' => array(
	'sentry',
	...

Copy packages/sentry/config/sentry.php to under app/config directory and edit

PHP error is automatically send by Error class that has been overridden

JS error is needs the following code in head tag to automatically send

<?php echo Sentry::get_raven_client(); ?>

Example

PHP

Add option and manually logging
// Send exception
$opt = array('tags' => array('MyTag' => 'MyTag Message'));
Sentry::send_exception(new Exception('message'), $opt);

// Send message
$opt = array('tags' => array('MyTag' => 'MyTag Message'));
Sentry::send_message('message', $opt);
Sentry::send_message('%04d-%02d-%02d', $opt, array(2013,4,1));

For more information, see raven-php

Javascript

Add option
<?php echo Sentry::get_raven_client(array('logger' => 'MyLogger')); ?>

For more information, see raven-js

Manually logging
try {
	errorThrowingCode();
} catch(e) {
	Raven.captureException(e);
}

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固