PHPackages                             irap/exception-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. irap/exception-logger

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

irap/exception-logger
=====================

Package for capturing and logging uncaught exceptions.

1.2.0(1y ago)01.4kMITPHPPHP &gt;=7.0.0

Since Aug 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/iRAP-software/package-exception-logger)[ Packagist](https://packagist.org/packages/irap/exception-logger)[ Docs](http://www.irap.org/)[ RSS](/packages/irap-exception-logger/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

Exception Logger
================

[](#exception-logger)

A package to capture uncaught exceptions and log them using the provided logger. All you have to do is create the object like so:

```
new \iRAP\ExceptionLogger\ExceptionLogger(
    $logger, // objec tof LoggerInterface
    "My Service",
    $nextExcptionHandler=function(Throwable $e) { /*  do nothing */ }
);
```

This will result in any uncaught exceptions being logged. The object works by setting the exception handler so it won't have any effect if you call set\_exception\_handler after having created the object.

If you want to run your own exception handler, you can just have it be called by the callback as shown below:

```
/* @var $logger LoggerInterface */
$nextExcptionHandler = function(Throwable $e) {
    // my custom uncaught exception handling goes here.
};

new \iRAP\ExceptionLogger\ExceptionLogger(
    $logger,
    "My Service",
    nextExcptionHandler
);
```

If you don't have a custom exception handler, I would recommend restoring PHP's default exception handling by doing the following:

```
$next = function(Throwable $e) {
    restore_exception_handler();
    throw $e; //This triggers the previous exception handler
};

new \iRAP\ExceptionLogger\ExceptionLogger(
    $logger,
    "My Service",
    $next
);
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~796 days

Total

4

Last Release

475d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52783970b96ca5954e3335aacc48870d8db7ee70dad5adaa0170a37e0b028566?d=identicon)[irap\_admin](/maintainers/irap_admin)

---

Top Contributors

[![Rockburner](https://avatars.githubusercontent.com/u/29091278?v=4)](https://github.com/Rockburner "Rockburner (6 commits)")[![annie917](https://avatars.githubusercontent.com/u/37503494?v=4)](https://github.com/annie917 "annie917 (2 commits)")[![programster](https://avatars.githubusercontent.com/u/5709838?v=4)](https://github.com/programster "programster (2 commits)")

---

Tags

loggingexceptionerror

### Embed Badge

![Health badge](/badges/irap-exception-logger/health.svg)

```
[![Health](https://phpackages.com/badges/irap-exception-logger/health.svg)](https://phpackages.com/packages/irap-exception-logger)
```

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1861.5M3](/packages/justbetter-magento2-sentry)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.7M10](/packages/rollbar-rollbar-laravel)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3511.6M24](/packages/analog-analog)[phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error &amp; exception handling subsystem.

15208.0k4](/packages/phptek-sentry)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19393.4k](/packages/facile-it-sentry-module)[e2ex/e2ex

Converts PHP Errors to Exceptions and (optionally) logs PHP Errors, Notices and Warnings with a PSR-3 compatible logger

101.5k](/packages/e2ex-e2ex)

PHPackages © 2026

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