PHPackages                             memran/marwa-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. memran/marwa-logger

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

memran/marwa-logger
===================

Lightweight PSR-3 JSON logger for PHP with redaction, rotation, and retention.

v1.0.0(3mo ago)09893MITPHPPHP &gt;=8.1CI passing

Since Mar 28Pushed 3mo agoCompare

[ Source](https://github.com/memran/marwa-logger)[ Packagist](https://packagist.org/packages/memran/marwa-logger)[ RSS](/packages/memran-marwa-logger/feed)WikiDiscussions main Synced today

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

Marwa Logger
============

[](#marwa-logger)

[![Packagist Version](https://camo.githubusercontent.com/c51a2863d7f36e435a83d9951a8d6fa3850995e35ee11df75f24d59fe8f59e0b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d656d72616e2f6d617277612d6c6f676765723f6c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/c51a2863d7f36e435a83d9951a8d6fa3850995e35ee11df75f24d59fe8f59e0b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d656d72616e2f6d617277612d6c6f676765723f6c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)[![Packagist Downloads](https://camo.githubusercontent.com/fb1c1d36978efc3196f6722fc85b12b3f5eeec1a770ebfb9d0b79aa8bb8fe0bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d656d72616e2f6d617277612d6c6f676765723f6c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/fb1c1d36978efc3196f6722fc85b12b3f5eeec1a770ebfb9d0b79aa8bb8fe0bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d656d72616e2f6d617277612d6c6f676765723f6c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)[![PHP](https://camo.githubusercontent.com/3e41095f4ad1c6ad78f988bd1c107f87972f334143c3ba814165a03e1f43a63c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/3e41095f4ad1c6ad78f988bd1c107f87972f334143c3ba814165a03e1f43a63c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![PSR-3](https://camo.githubusercontent.com/35168dfd8ffe1e0b7a86ccd5d2206d75391e109cf11d7371515836a24fcef564/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d2d332d636f6d70617469626c652d304137423833)](https://camo.githubusercontent.com/35168dfd8ffe1e0b7a86ccd5d2206d75391e109cf11d7371515836a24fcef564/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d2d332d636f6d70617469626c652d304137423833)[![CI](https://camo.githubusercontent.com/2ccfcab676b10a283723fa7375122ee7f25d109a8e605836ebd1ade493296080/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f43492d476974487562253230416374696f6e732d3230383846463f6c6f676f3d676974687562616374696f6e73266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/2ccfcab676b10a283723fa7375122ee7f25d109a8e605836ebd1ade493296080/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f43492d476974487562253230416374696f6e732d3230383846463f6c6f676f3d676974687562616374696f6e73266c6f676f436f6c6f723d7768697465)[![PHPStan](https://camo.githubusercontent.com/b5c4f3fc36b86eea1d36b22be51cfa22e53ac18b6f7b7c558c1441a247d12f01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d322e782d323331463230)](https://camo.githubusercontent.com/b5c4f3fc36b86eea1d36b22be51cfa22e53ac18b6f7b7c558c1441a247d12f01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d322e782d323331463230)[![PHPUnit](https://camo.githubusercontent.com/e280d369409cc886239f4ffacaa6c28df206c329e9418b2ea3578a554e6f7072/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d31302e352d334338373341)](https://camo.githubusercontent.com/e280d369409cc886239f4ffacaa6c28df206c329e9418b2ea3578a554e6f7072/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d31302e352d334338373341)

Lightweight PSR-3 JSON logger for PHP 8.1+ with sensitive-data redaction, file rotation, and retention cleanup.

Features
--------

[](#features)

- ✅ PSR-3 compatible `SimpleLogger`
- 🧾 NDJSON output for easy ingestion by log processors
- 🔒 Recursive sensitive-data filtering
- 🚦 Production gating by log level and request origin
- 🗂️ File rotation by size
- ♻️ Optional retention by age and file count
- 🧪 Composer scripts, PHPUnit, PHPStan, and CI included

📦 Installation
--------------

[](#-installation)

```
composer require memran/marwa-logger
```

🚀 Quick Start
-------------

[](#-quick-start)

```
