PHPackages                             szemul/logging-error-handling-context - 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. szemul/logging-error-handling-context

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

szemul/logging-error-handling-context
=====================================

Provides an error handler and logging context to manage contextual data to be injected into errors and log messages.

1.0.0(3y ago)02.0k4MITPHPPHP ^8.0

Since Sep 10Pushed 3y ago2 watchersCompare

[ Source](https://github.com/szemul/logging-error-handling-context)[ Packagist](https://packagist.org/packages/szemul/logging-error-handling-context)[ RSS](/packages/szemul-logging-error-handling-context/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (4)

Logging-error handling context
==============================

[](#logging-error-handling-context)

[![CI pipeline](https://github.com/szemul/logging-error-handling-context/actions/workflows/php.yml/badge.svg)](https://github.com/szemul/logging-error-handling-context/actions/workflows/php.yml/badge.svg)[![codecov](https://camo.githubusercontent.com/499405d83b5c70874bdb704eaa6cfdf28b3583a868aa69af124d4410b65d8710/68747470733a2f2f636f6465636f762e696f2f67682f737a656d756c2f6c6f6767696e672d6572726f722d68616e646c696e672d636f6e746578742f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4b5a4a31334f46353737)](https://codecov.io/gh/szemul/logging-error-handling-context)

Provides an error handler and logging context to manage contextual data to be injected into errors and log messages.

Context
-------

[](#context)

The context is useful for storing values used to enrich logs and errors. The context class supports switching contexts. When adding a new context, the existing values are preserved, and you can switch back to any previous context and recover the state (switching back drops any changes in any newer context).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1393d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e74721923742f5c04b8ccd5796e0a0e0e744fd004fbaae3c7813b27e125ae70?d=identicon)[szeber](/maintainers/szeber)

---

Top Contributors

[![szeber](https://avatars.githubusercontent.com/u/1102330?v=4)](https://github.com/szeber "szeber (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/szemul-logging-error-handling-context/health.svg)

```
[![Health](https://phpackages.com/badges/szemul-logging-error-handling-context/health.svg)](https://phpackages.com/packages/szemul-logging-error-handling-context)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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