https://github.com/meadsteve/monosnag
🐛 Monolog handler for bugsnag.
https://github.com/meadsteve/monosnag
Last synced: 4 months ago
JSON representation
🐛 Monolog handler for bugsnag.
- Host: GitHub
- URL: https://github.com/meadsteve/monosnag
- Owner: meadsteve
- License: mit
- Created: 2014-03-04T12:12:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T12:00:54.000Z (over 4 years ago)
- Last Synced: 2025-03-15T01:36:10.689Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 43 KB
- Stars: 20
- Watchers: 3
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: License
Awesome Lists containing this project
README
MonoSnag
==========
[](https://github.com/meadsteve/MonoSnag/actions/workflows/php.yml)
[](https://packagist.org/packages/mead-steve/mono-snag)
[](https://packagist.org/packages/mead-steve/mono-snag)
[](https://packagist.org/packages/mead-steve/mono-snag)[Monolog](https://seldaek.github.io/monolog/) Handler connection to [Bugsnag](http://bugsnag.com)
Installation
------------
Via Composer using
```shell
composer require mead-steve/mono-snag
```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.```php
$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")));```