Skip to content

koliesnik/MonoSnag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonoSnag

Build Status Coverage Status Latest Stable Version License Monthly Downloads

Monolog Handler connection to Bugsnag

Installation

Via Composer: Add the following to your composer.json:

  "require": {
        "mead-steve/mono-snag": "^2.0.0"
    }

Usage

A handler is provided that wraps up a Bugsnag client. By default the handler will grab anything at Logger::ERROR and above and send it to Bugsnag.

$logger  = new Monolog\Logger("Example");

$bugsnagClient = new Bugsnag_Client('YOUR-BUGSNAG-API-KEY-HERE');
//... bugsnag specific config goes here.
$bugsnagHandler = new \MeadSteve\MonoSnag\BugsnagHandler($bugsnagClient);

$logger->pushHandler($bugsnagHandler);

// The following error will get sent automatically to Bugsnag
$logger->addError("oh no!", array('exception' => new \Exception("ohnoception")));

About

Monolog handler for bugsnag.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%