定制 gietos/yii2-sentry-log 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gietos/yii2-sentry-log

最新稳定版本:0.0.1

Composer 安装命令:

composer require gietos/yii2-sentry-log

包简介

Simple Yii2 Sentry target for logging (http://getsentry.com)

README 文档

README

Yii2 Sentry target for logging based on Raven client.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require opus-online/yii2-sentry-log "dev-master"

or add

"opus-online/yii2-sentry-log": "~1.0.0"

to the require section of your composer.json file.

Usage

Add target class in your project config:

'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'sentry\SentryTarget',
                'levels' => ['error', 'warning'],   // or smth else
                'dsn' => '',                        // sentry access string
            ],
        ],
    ],

Then use like ordinary log:

Yii::error('some string');

or

Yii::error([
    'msg' => 'some message',
    'data' => [...],                // Any pair key=>value for adding to the sentry message 
]);

Note

Because the mechanism of logging is asyncronical, standard sentry stacktrace is unavailable. But this extension sends logger stacktrace in extra parameters of message.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD
  • 更新时间: 2015-05-18