PHPackages                             jk/monolog-request-header-processor - 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. jk/monolog-request-header-processor

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

jk/monolog-request-header-processor
===================================

Monolog processor which injects HTTP request headers into the log

1.0.0(8y ago)5585.2k↓24.5%22MITPHP

Since Aug 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jk/monolog-request-header-processor)[ Packagist](https://packagist.org/packages/jk/monolog-request-header-processor)[ RSS](/packages/jk-monolog-request-header-processor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (2)

Request Header Monolog Processor
================================

[](#request-header-monolog-processor)

I needed something to log and debug my Amazon Alexa skill which sends POST request to my server. So here it is.

How to use it
-------------

[](#how-to-use-it)

```
use Monolog\Logger;

$log = new Monolog\Logger('test');
$log->pushProcessor(new \JK\Monolog\Processor\RequestHeaderProcessor());
$log->pushHandler(…);

$log->notice('Noticed something');
```

Sample output
-------------

[](#sample-output)

This is the sample output of a normal GET request

```
[2017-08-28 13:04:09] test.NOTICE: Noticed something [] {"Host":"localhost","Connection":"keep-alive","Cache-Control":"max-age=0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","DNT":"1","Accept-Encoding":"gzip, deflate, br","Accept-Language":"de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"}

```

So the extra information in pretty print is:

```
{
	"Host":"localhost",
	"Connection":"keep-alive",
	"Cache-Control":"max-age=0",
	"Upgrade-Insecure-Requests":"1",
	"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36",
	"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
	"DNT":"1",
	"Accept-Encoding":"gzip, deflate, br",
	"Accept-Language":"de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3185d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

headerhttploggingmonologprocessorrequest-headerhttplogloggingheadermonolog

### Embed Badge

![Health badge](/badges/jk-monolog-request-header-processor/health.svg)

```
[![Health](https://phpackages.com/badges/jk-monolog-request-header-processor/health.svg)](https://phpackages.com/packages/jk-monolog-request-header-processor)
```

###  Alternatives

[wazaari/monolog-mysql

A handler for Monolog that sends messages to MySQL

140884.1k6](/packages/wazaari-monolog-mysql)[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

76410.4k1](/packages/hannesvdvreken-guzzle-debugbar)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[inpsyde/logzio-monolog

Logz.io integration for Monolog

191.2M1](/packages/inpsyde-logzio-monolog)[monolog-http/monolog-http

A collection of monolog handlers using PSR-18 http client

416.1k](/packages/monolog-http-monolog-http)

PHPackages © 2026

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