PHPackages                             silpion/stack-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. silpion/stack-logger

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

silpion/stack-logger
====================

Logger Stack middleware for logging request and responses.

v1.0.0(12y ago)611.1k1MITPHPPHP &gt;=5.3.3

Since Apr 17Pushed 11y ago3 watchersCompare

[ Source](https://github.com/h4cc/StackLogger)[ Packagist](https://packagist.org/packages/silpion/stack-logger)[ RSS](/packages/silpion-stack-logger/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (1)

StackLogger
===========

[](#stacklogger)

Logger [Stack](http://stackphp.com/) middleware that logs Request and Response.

[![Build Status](https://camo.githubusercontent.com/cb959b31bbff6f05a714fa262ecf7c677141900ba2942a7b0304fbb45319e426/68747470733a2f2f7472617669732d63692e6f72672f683463632f537461636b4c6f676765722e706e67)](https://travis-ci.org/h4cc/StackLogger)[![HHVM Status](https://camo.githubusercontent.com/cc9a476be58258c3fe1e3ecc9bda66ed895adef7556f3fb756550cbc13ca98dd/687474703a2f2f6868766d2e683463632e64652f62616467652f73696c70696f6e2f737461636b2d6c6f676765722e706e67)](http://hhvm.h4cc.de/package/silpion/stack-logger)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0029d37f5f986becf66edf9215b485c1f7f6589bebc95fb974ef2c15c8ce5c99/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f683463632f537461636b4c6f676765722f6261646765732f7175616c6974792d73636f72652e706e673f733d37333266383666663230303431363036643836626566393361386164326435653763366133613966)](https://scrutinizer-ci.com/g/h4cc/StackLogger/)[![Code Coverage](https://camo.githubusercontent.com/273e2d5422715dc3f1c56b54af69a59e16d6ee462f44e89e262d1915be0c9f75/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f683463632f537461636b4c6f676765722f6261646765732f636f7665726167652e706e673f733d32653638376461313936363764666162313436376266366631343363366131373432343138636534)](https://scrutinizer-ci.com/g/h4cc/StackLogger/)[![Project Status](https://camo.githubusercontent.com/46a9de3ad622e1ee0ec5cbb122c842d8a78c5c01e7b520d2b9a0c66282088f89/687474703a2f2f7374696c6c6d61696e7461696e65642e636f6d2f683463632f537461636b4c6f676765722e706e67)](http://stillmaintained.com/h4cc/StackLogger)

Usage
-----

[](#usage)

### Example

[](#example)

Have a look at `example.php` for a example how to use this middleware.

### Options

[](#options)

The following options can be used:

- **logger** (optional): A instance of a PSR-3 compatible logger, like Monolog. Default is a `NullLogger`.
- **log\_level** (optional): The log level used for the log entries. Default is LogLevel::INFO.
- **log\_sub\_request** (optional): Flag if Sub-Requests (HttpKernelInterface::SUB\_REQUEST) should be logged. Default is false.

Intallation
-----------

[](#intallation)

The recommended way to install StackLogger is through [Composer](http://getcomposer.org/):

```
{
    "require": {
        "silpion/stack-logger": "@stable"
    }
}
```

**Protip:** you should browse the [`silpion/stack-logger`](https://packagist.org/packages/silpion/stack-logger)page to choose a stable version to use, avoid the `@stable` meta constraint.

License
-------

[](#license)

StackLogger is released under the MIT License. See the bundled LICENSE file for details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

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

4410d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ce109f0fc05421b5db21c1f35e9ff78be9bae38f5b6e3bd6121f2eb2417cf53?d=identicon)[h4cc](/maintainers/h4cc)

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

---

Top Contributors

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

---

Tags

responserequeststackloggerPSR3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/silpion-stack-logger/health.svg)

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

###  Alternatives

[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[prettus/laravel-request-logger

HTTP request logger middleware for Laravel

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

Effortless artisan console output with your usual Laravel logger

1112.7k](/packages/devthis-console-logg)

PHPackages © 2026

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