承接 opus-online/yii2-sentry-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

opus-online/yii2-sentry-log

Composer 安装命令:

composer require opus-online/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.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 2015-04-16