2017 © Pedro Peláez
 

craft-plugin craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

image

gold/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  • Friday, January 27, 2017
  • by sidneywidmer
  • Repository
  • 10 Watchers
  • 13 Stars
  • 10,752 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

Bugsnag Notifier for Craft


This is basically a fork of the official Bugsnag Laravel Package. Thanks for the good work and I hope you guys don't mind :), (*1)

The Bugsnag Notifier for the excellent Craft CMS gives you instant notification of errors and exceptions. Once installed, the plugin will listen to the Yii Events onError and onException as recommended by brand., (*2)

Bugsnag captures errors in real-time from your web, mobile and desktop applications, helping you to understand and resolve them as fast as possible. Create a free account to start capturing errors from your applications., (*3)

Installation

  • Download this repo
  • Rename the folder to bugsnag and place it into your Craft CMS Plugin directory (craft/plugins)
  • In the newly created craft/plugins/bugsnag directory run composer install
  • Navigate to your plugins page /settings/plugins and click Install
  • Make sure to configure the plugin as described in the next section

Configuration

  1. Create a file craft/config/bugsnag.php that contains your API key:, (*4)

  2. Configure your api_key:, (*5)

    <?php # craft/config/bugsnag.php
    
    return array(
        'api_key' => 'YOUR-API-KEY-HERE'
    );
    
  3. Optionally, you can add the notify_release_stages key to the same file above to define which Craft environments will send Exceptions to Bugsnag., (*6)

    return array(
        'api_key' => 'YOUR-API-KEY-HERE',
        'notify_release_stages' => ['production', 'staging']
    );
    

Hooks

discardBugsnagExceptionEvent($event)

Give plugins a chance to discard certain types of exceptions, such as a 404., (*7)

/**
 * Stop an exception event from being reported to bugsnag
 * 
 * @param CExeptionEvent $event
 * @return boolean
 */
function discardBugsnagExceptionEvent($event)
{
    $exception = $event->exception;

    if (/* $exception should be discarded */){
        return true;
    }
}

Other

You can always grab the bugsnag instance from the bugsnag service to send your own errors and exceptions or register a beforeNotifyFunction., (*8)

craft()->bugsnag->instance()->notifyError("ErrorType", "Something bad happened here too");

See the Additional Configuration documentation on the bugsnag-php library for more information., (*9)

The Versions

27/01 2017

dev-master

9999999-dev https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

27/01 2017

dev-release

dev-release https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

27/01 2017

1.3

1.3.0.0 https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

27/01 2017

1.2

1.2.0.0 https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

10/06 2016

1.1

1.1.0.0 https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

09/12 2015

1.0

1.0.0.0 https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive

02/07 2015

0.1

0.1.0.0 https://github.com/Goldinteractive/craft-bugsnag

Unofficial Bugsnag notifier for Craft Cms.

  Sources   Download

MIT

The Requires

 

by Gold Interactive