定制 violet88/bugsnag-silverstripe 二次开发

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

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

violet88/bugsnag-silverstripe

最新稳定版本:v1.6.1

Composer 安装命令:

composer require violet88/bugsnag-silverstripe

包简介

A module to use Bugsnag in SilverStripe projects.

README 文档

README

CI codecov.io Scrutinizer Code Quality Build Status Code Intelligence Status

Requirements

Dev requirements

Installation

To install run the following command

composer require violet88/bugsnag-silverstripe

Note: Make sure the required modules are installed before using the module.

License

See License

Documentation

Configuration

For base use, add the following to your .env file

When running local, to prevent Bugsnag from being filled with errors, set BUGSNAG_ACTIVE to false OR do not declare it. (If not declared messages will also not be sent to Bugsnag.

BUGSNAG_API_KEY=<YOUR BUGSNAG API KEY>
BUGSNAG_STANDARD_SEVERITY=<STANDARD SEVERITY LEVEL FOR BUGSNAG (info OR warning OR error)>
BUGSNAG_ACTIVE=<true OR false, depending on whether bugsnag should be ACTIVE>
BUGSNAG_RELEASE_STAGE=<RELEASE STAGE FOR YOUR CURRENT REVISION>

For using the BugsnagLogger as the standard error logger, add the following to your configuration yaml

SilverStripe\Core\Injector\Injector:
  Psr\Log\LoggerInterface:
    calls:
      BugsnagHandler: [pushHandler, ['%$BugsnagHandler']]
  BugsnagHandler:
    class: Violet88\BugsnagModule\BugsnagLogger
    constructor:
      - '%$Violet88\BugsnagModule\Bugsnag'
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - Violet88\BugsnagModule\BugsnagSiteConfigExtension

For using the CLI command to sent your current release revision to Bugsnag, add the following to your routes yaml

SilverStripe\Control\Director:
    rules:
        'bugsnag//build': 'Violet88\BugsnagModule\BugsnagController'
        'bugsnag//initial': 'Violet88\BugsnagModule\BugsnagController'

Basic usage

For sending a basic error to Bugsnag, use the following code

use Violet88\BugsnagModule\Bugsnag;
use Exception;
use SilverStripe\Core\Injector\Injector;

try{
    //do something
} catch (Exception $e) {
    $bugsnag = Injector::inst()->get(Bugsnag::class);
    $bugsnag->sendException($e);
}

Maintainers

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

  • Create a new issue
  • Choose the issue template for 'Bugs'
  • Follow the instructions in the template

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

Feel free to join the community on slack: Join Slack

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-09-19