PHPackages                             php-middleware/log-exceptions - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. php-middleware/log-exceptions

ActiveLibrary[HTTP &amp; Networking](/categories/http)

php-middleware/log-exceptions
=============================

Log all exceptions from your middlewares

1.0.1(8y ago)232[1 PRs](https://github.com/php-middleware/log-exceptions/pulls)MITPHPPHP ^5.6 || ^7.0

Since May 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/php-middleware/log-exceptions)[ Packagist](https://packagist.org/packages/php-middleware/log-exceptions)[ RSS](/packages/php-middleware-log-exceptions/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (7)Versions (5)Used By (0)

log-exceptions [![Build Status](https://camo.githubusercontent.com/c8bf1a58681c6badd800fc30d7000653c77e746cb94c60a3138dc576615cb90d/68747470733a2f2f7472617669732d63692e6f72672f7068702d6d6964646c65776172652f6c6f672d657863657074696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-middleware/log-exceptions)
=====================================================================================================================================================================================================================================================================================================================================

[](#log-exceptions-)

Log all exceptions from your middlewares

When your middleware throw exception this middleware catch it, log it and throw again. You will newer miss any exception.

Installation
------------

[](#installation)

```
composer require php-middleware/log-exceptions

```

To build this middleware you need to injecting inside `LogExceptionMiddleware` instance of any `Psr\Log\LoggerInterface` implementation:

```
$logger = new LoggerImplementation();
$middleware = new PhpMiddleware\LogException\LogExceptionMiddleware($logger);
```

and add it into your middleware dispatcher. You can also setup level of log (default critical, second arg) and message (third arg).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a2113828a101b473d256ef12e6bd89d67bcbef0621704cfeb3304c98a16a47?d=identicon)[snapshotpl](/maintainers/snapshotpl)

---

Top Contributors

[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (8 commits)")

---

Tags

psrpsr-7middlewaredebugexceptionlogger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-middleware-log-exceptions/health.svg)

```
[![Health](https://phpackages.com/badges/php-middleware-log-exceptions/health.svg)](https://phpackages.com/packages/php-middleware-log-exceptions)
```

###  Alternatives

[psr/http-server-middleware

Common interface for HTTP server-side middleware

18091.2M1.5k](/packages/psr-http-server-middleware)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[php-middleware/php-debug-bar

PHP Debug Bar PSR-15 middleware with PSR-7

76433.5k2](/packages/php-middleware-php-debug-bar)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.0M61](/packages/mezzio-mezzio-router)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mezzio/mezzio-helpers

Helper/Utility classes for Mezzio

134.3M67](/packages/mezzio-mezzio-helpers)

PHPackages © 2026

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