PHPackages                             miljan9602/bugsnag-psr-logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. miljan9602/bugsnag-psr-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

miljan9602/bugsnag-psr-logger
=============================

Official Bugsnag PHP PSR Logger.

v1.4.3(6y ago)04941MITPHPPHP &gt;=5.5

Since Jul 7Pushed 6y agoCompare

[ Source](https://github.com/Miljan9602/bugsnag-psr-logger)[ Packagist](https://packagist.org/packages/miljan9602/bugsnag-psr-logger)[ Docs](https://github.com/bugsnag/bugsnag-psr)[ RSS](/packages/miljan9602-bugsnag-psr-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (14)Used By (1)

Bugsnag PHP PSR Logger
======================

[](#bugsnag-php-psr-logger)

[![Build Status](https://camo.githubusercontent.com/11c60e564341dda18339ca901c859393d3d5a3318c59a8ca6c76c20f7cc462f5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f627567736e61672f627567736e61672d7073722d6c6f676765722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bugsnag/bugsnag-psr-logger)[![StyleCI Status](https://camo.githubusercontent.com/348c5f79394e400adb28ee70abbee310298a3e5f212d6ebbfba5b9e4a1221bcc/68747470733a2f2f7374796c6563692e696f2f7265706f732f36323034313633352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/62041635)

The Bugsnag PHP PSR logger is an implementation of the [Fig PSR logging standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) that provides a standard interface to logging to Bugsnag.

Getting Started
---------------

[](#getting-started)

### Installing

[](#installing)

Add `bugsnag/bugsnag-psr-logger` to your `composer.json`.

### Configuring

[](#configuring)

This library provides a logger interface but uses the [bugsnag-php notifier library](https://github.com/bugsnag/bugsnag-php) as a base. All configuration should be performed as described in the [official bugsnag-php documentation](https://docs.bugsnag.com/platforms/php/).

### Using the Loggers

[](#using-the-loggers)

The library provides two loggers, `BugsnagLogger` and `MultiLogger`.

`BugsnagLogger` will automatically send a notification to Bugsnag if it receives a message with a severity higher than `info`. This will allow you to notify of any handled exceptions through interfacing the logger directly with the framework you are using. Ensure that the logger can communicate with the `bugsnag-php` library by passing the `client` object into it on creation.

```
$bugsnag = Bugsnag\Client::make('YOUR-API-KEY-HERE');
$logger = new Bugsnag\PsrLogger\BugsnagLogger($bugsnag);

# Will send a notification to bugsnag
$logger->error('An error occurred');
```

If you wish to use a separate logger alongside `BugsnagLogger` you will need to use `MultiLogger`. By passing it an array of `Logger` objects on construction, `MultiLogger` will call into each passed `Logger` in turn when a message is logged.

```
$logger = new Bugsnag\PsrLogger\BugsnagLogger($bugsnag);
$mySecondLogger = new Logger();
$multiLogger = new Bugsnag\PsrLogger\MultiLogger([$logger, $mySecondLogger]);

# Will log to $mySecondLogger and send a notification to bugsnag through $logger
$multiLogger->error('An error occurred');
```

The default level at which logs will be sent to Bugsnag is `Psr\Log\LogLevel::NOTICE`. This can be overridden using the `setNotifyLevel` function:

```
$logger = new Bugsnag\PsrLogger\BugsnagLogger($bugsnag);

# Will not send a notification to bugsnag by default
$logger->info('Some interesting information');

$logger->setNotifyLevel(Psr\Log\LogLevel::INFO);

# Will send a notification to bugsnag
$logger->info('Some more interesting information');
```

For more information on integrating the loggers into specific frameworks see the individual setup information found in the [bugsnag-php documentation](https://docs.bugsnag.com/platforms/php/).

Contributing
------------

[](#contributing)

All contributors are welcome! For information on how to build, test and release `bugsnag-psr-logger`, see our [contributing guide](CONTRIBUTING.md). Feel free to comment on [existing issues](https://github.com/bugsnag/bugsnag-psr-logger/issues)for clarification or starting points.

License
-------

[](#license)

The Bugsnag PSR logger is free software released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 62% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~123 days

Recently: every ~176 days

Total

11

Last Release

2366d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v1.0.1PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd248f5852907c572575507ff617416e5439bfcc481bd981406919615887539c?d=identicon)[Miljan9602](/maintainers/Miljan9602)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (49 commits)")[![kattrali](https://avatars.githubusercontent.com/u/333454?v=4)](https://github.com/kattrali "kattrali (14 commits)")[![Cawllec](https://avatars.githubusercontent.com/u/7754028?v=4)](https://github.com/Cawllec "Cawllec (7 commits)")[![tomlongridge](https://avatars.githubusercontent.com/u/6351188?v=4)](https://github.com/tomlongridge "tomlongridge (3 commits)")[![ankurk91](https://avatars.githubusercontent.com/u/6111524?v=4)](https://github.com/ankurk91 "ankurk91 (2 commits)")[![martin308](https://avatars.githubusercontent.com/u/475364?v=4)](https://github.com/martin308 "martin308 (1 commits)")[![Miljan9602](https://avatars.githubusercontent.com/u/19391119?v=4)](https://github.com/Miljan9602 "Miljan9602 (1 commits)")[![snmaynard](https://avatars.githubusercontent.com/u/829837?v=4)](https://github.com/snmaynard "snmaynard (1 commits)")[![alfredbez](https://avatars.githubusercontent.com/u/1001186?v=4)](https://github.com/alfredbez "alfredbez (1 commits)")

---

Tags

psrloggingerrorsexceptionsbugsnagtracking

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/miljan9602-bugsnag-psr-logger/health.svg)

```
[![Health](https://phpackages.com/badges/miljan9602-bugsnag-psr-logger/health.svg)](https://phpackages.com/packages/miljan9602-bugsnag-psr-logger)
```

###  Alternatives

[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90234.6M36](/packages/bugsnag-bugsnag-laravel)[bugsnag/bugsnag

Official Bugsnag notifier for PHP applications.

56347.0M78](/packages/bugsnag-bugsnag)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[bugsnag/bugsnag-symfony

Official BugSnag notifier for Symfony applications.

453.0M3](/packages/bugsnag-bugsnag-symfony)[evolution7/bugsnag-bundle

Bugsnag error reporting integration for Symfony2

19126.5k1](/packages/evolution7-bugsnag-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
