PHPackages                             wyrihaximus/monolog-processors - 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. wyrihaximus/monolog-processors

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

wyrihaximus/monolog-processors
==============================

Collection of additional processors for monolog

3.1.0(1mo ago)5144.6k↑354.2%[1 issues](https://github.com/WyriHaximus/php-monolog-processors/issues)1MITMakefilePHP ^8.4CI passing

Since Oct 2Pushed 1w ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/php-monolog-processors)[ Packagist](https://packagist.org/packages/wyrihaximus/monolog-processors)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-monolog-processors/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (7)Dependencies (7)Versions (15)Used By (1)

Processors for Monolog
======================

[](#processors-for-monolog)

[![Continuous Integration](https://github.com/wyrihaximus/php-monolog-processors/workflows/Continuous%20Integration/badge.svg)](https://github.com/wyrihaximus/php-monolog-processors/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/1252ee0a13f506285410c650d14a280af7b689ea69cee4e4408b73f1060daea0/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6d6f6e6f6c6f672d70726f636573736f72732f762f737461626c652e706e67)](https://packagist.org/packages/wyrihaximus/monolog-processors)[![Total Downloads](https://camo.githubusercontent.com/df3e97ee0af6442c149e83b48a4e3ba6d1147d0fef8f39dd28369187e930b4e9/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6d6f6e6f6c6f672d70726f636573736f72732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wyrihaximus/monolog-processors/stats)[![Type Coverage](https://camo.githubusercontent.com/5dcbb570074d16bde20234d2c4533a6dcaa988eb42a1abe3d601706bb792e4c8/68747470733a2f2f73686570686572642e6465762f6769746875622f57797269486178696d75732f7068702d6d6f6e6f6c6f672d70726f636573736f72732f636f7665726167652e737667)](https://shepherd.dev/github/WyriHaximus/php-monolog-processors)[![License](https://camo.githubusercontent.com/653624e7543464f898677039ee94ed3b07d3186c96f3f8cc42ce847067bb8657/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6d6f6e6f6c6f672d70726f636573736f72732f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/monolog-processors)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/monolog-processors

```

Processors
==========

[](#processors)

CopyProcessor()
---------------

[](#copyprocessor)

Copies a value from the location in the first argument to the location in the second argument in the record array.

```
new CopyProcessor('context.abc', 'context.def');
```

So the following record:

```
$record = [
    'context' => [
        'abc' => 'value',
    ],
];
```

Becomes:

```
$record = [
    'context' => [
        'abc' => 'value',
        'def' => 'value',
    ],
];
```

ExceptionClassProcessor()
-------------------------

[](#exceptionclassprocessor)

When encountering a throwable in `context.exception` it adds the class name into `context.exception_class`:

```
new ExceptionClassProcessor();
```

KeyValueProcessor(string $key, $value)
--------------------------------------

[](#keyvalueprocessorstring-key-value)

Add a fixed value for a fixed key into the `extra` array of the record. For example:

```
new KeyValueProcessor('version', 'v1.33.128');
```

RuntimeProcessor
----------------

[](#runtimeprocessor)

Add `runtime` into `extra` array of the record with `microtime(true)` since creation of `RuntimeProcessor`. For example:

```
new RuntimeProcessor();
```

ToContextProcessor(array $keys = \['channel', 'extra', 'datetime'\])
--------------------------------------------------------------------

[](#tocontextprocessorarray-keys--channel-extra-datetime)

Copy the given items in the record array `context` item. For example:

```
new ToContextProcessor();
```

TraceProcessor()
----------------

[](#traceprocessor)

Adds `trace` into `extra` with the contents of `debug_backtrace` (when true is passed into the constructor) or `Throwable::getTrace` without the arguments.

```
new TraceProcessor();
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2026 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance92

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.7% 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 ~526 days

Recently: every ~733 days

Total

7

Last Release

40d ago

Major Versions

1.3.0 → 2.0.02022-01-13

2.0.0 → 3.0.02023-08-10

PHP version history (5 changes)1.0.0PHP ^7.0

1.3.0PHP ^7.2

2.0.0PHP ^8

3.0.0PHP ^8.2

3.1.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (60 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (14 commits)")[![renovate-runner[bot]](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/renovate-runner[bot] "renovate-runner[bot] (7 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (3 commits)")

---

Tags

hacktoberfestmonologmonolog-processorphpphp7

### Embed Badge

![Health badge](/badges/wyrihaximus-monolog-processors/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-monolog-processors/health.svg)](https://phpackages.com/packages/wyrihaximus-monolog-processors)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k203.8M358](/packages/symfony-monolog-bridge)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M626](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10823.1k](/packages/naoray-laravel-github-monolog)[lion/bundle

Lion-framework configuration and initialization package

122.4k4](/packages/lion-bundle)

PHPackages © 2026

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