PHPackages                             bmwx591/request-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. bmwx591/request-logger

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

bmwx591/request-logger
======================

Library for logging application requests

v0.0.2(1y ago)011MITPHPPHP ^7.4||^8.0

Since Feb 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bmwx591/request-logger)[ Packagist](https://packagist.org/packages/bmwx591/request-logger)[ RSS](/packages/bmwx591-request-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Request Logger
==============

[](#request-logger)

[![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://choosealicense.com/licenses/mit/)

 The simple template for create request logging system.

 All that you need is to use some logger that implement `Psr\Log\LoggerInterface`and request mapper that implements `Bmwx591\RequestLogger\Mapper\RequestMapperInterface`for mapping log message and context. If you want to use some special rules to check if you need to log one request or another you can add rules resolver implementation of `Bmwx591\RequestLogger\RulesResolver\RulesResolverInterface`. If you won`t add rules resolver than all requests will be logged.

 Logger works with wrapped requests and responses so you can write you own wrappers by implement `Bmwx591\RequestLogger\Logger\WrappedRequest` and `Bmwx591\RequestLogger\Logger\WrappedResponse` interfaces to add ability to work with you type of requests and responses if they don`t implement PSR-7 `Psr\Http\Message\RequestInterface` and `Psr\Http\Message\ResponseInterface`.

Usage/Examples
--------------

[](#usageexamples)

```
use Bmwx591\RequestLogger\Logger\RequestLogger;

$requestLogger = new RequestLogger(
    new SomeLogger(), // some implementation of Psr\Log\LoggerInterface
    $requestMapper, // implementation of RequestMapperInterface for map message and content for request
    $rulesResolver // implementation of RulesResolverInterface or null
);

$requestLogger
    ->incomingRequest()
    ->outgoingResponse()
    ->addExternal()
    ->pushLogs();
```

Authors
-------

[](#authors)

- [@bmwx591](https://www.github.com/bmwx591)

Running Tests
-------------

[](#running-tests)

To run tests, run the following command

```
vendor/bin/phpunit
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance45

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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 ~22 days

Total

2

Last Release

431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9316a07066081c1e402633c3de0a04f6fba08693cee30be97441c42801d739fe?d=identicon)[bmwx591](/maintainers/bmwx591)

---

Top Contributors

[![bmwx591](https://avatars.githubusercontent.com/u/10225192?v=4)](https://github.com/bmwx591 "bmwx591 (1 commits)")

---

Tags

requestpsr7logger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bmwx591-request-logger/health.svg)

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

###  Alternatives

[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[prettus/laravel-request-logger

HTTP request logger middleware for Laravel

24646.6k1](/packages/prettus-laravel-request-logger)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8674.9k](/packages/illuminated-console-logger)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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