PHPackages                             maplephp/log - 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. maplephp/log

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

maplephp/log
============

PHP PSR-3 Logger library, standardized approach to logging messages.

v2.0.0(4mo ago)21453Apache-2.0PHPPHP &gt;=8.2

Since Nov 29Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/MaplePHP/Log)[ Packagist](https://packagist.org/packages/maplephp/log)[ Docs](https://wazabii.se)[ RSS](/packages/maplephp-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (3)

MaplePHP - PSR-3 Logger
=======================

[](#maplephp---psr-3-logger)

PHP PSR-3 Logger library – your reliable companion for efficient logging in PHP applications. This library adheres to the PSR-3 standard, providing a seamless and standardized approach to logging messages across different components of your application.

Log-levels
----------

[](#log-levels)

1. **emergency:** System is unusable
2. **alert:** Action must be taken immediately
3. **critical:** Critical conditions
4. **error:** Runtime errors that do not require immediate action but usually logged and monitored.
5. **warning:** Exceptional occurrences that are not errors.
6. **notice:** Normal but significant events.
7. **info:** Interesting events (User logs in, SQL logs.)
8. **debug:** Detailed debug information.
9. **log:** Logs with an arbitrary level.

Stream/file handler
-------------------

[](#streamfile-handler)

#### Add namespaces

[](#add-namespaces)

```
use MaplePHP\Log\Logger;
use MaplePHP\Log\Handlers\StreamHandler;
```

#### Create simple stream logger

[](#create-simple-stream-logger)

```
$log = new Logger(new StreamHandler("/path/to/logger.log"));
$log->warning("The user {firstname} has been added.", ["firstname" => "John", "lastname" => "Doe"]);
```

#### Rotatable log files

[](#rotatable-log-files)

Create simple stream rotatables loggers. Will create a new log file if size is more than MAX\_SIZE (5000 KB) and remove log files if total file count is more than MAX\_COUNT 10.

```
$log = new Logger(new StreamHandler("/path/to/logger.log", StreamHandler::MAX_SIZE, StreamHandler::MAX_COUNT));
$log->warning("The user {firstname} has been added.", ["firstname" => "John", "lastname" => "Doe"]);
```

PHP error log handler (error\_log())
------------------------------------

[](#php-error-log-handler-error_log)

You can (not required) specify a log file location in ErrorLogHandler. If argument is empty, then server default location.

#### Add namespaces

[](#add-namespaces-1)

```
use MaplePHP\Log\Logger;
use MaplePHP\Log\Handlers\ErrorLogHandler;
```

```
$log = new Logger(new ErrorLogHandler("/path/to/logger.log"));
$log->warning("The user {firstname} has been added.", ["firstname" => "John", "lastname" => "Doe", "data" => ["city" => "Stockholm", "coor" => "122,1212"]]);
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance77

Regular maintenance activity

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

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

Every ~258 days

Total

4

Last Release

126d ago

Major Versions

v1.0.2 → v2.0.02026-01-12

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/724b188e785081275926c5b9c07082e2b3f4afb797efdda61eb1630457e17824?d=identicon)[wazabii](/maintainers/wazabii)

---

Top Contributors

[![wazabii8](https://avatars.githubusercontent.com/u/6400238?v=4)](https://github.com/wazabii8 "wazabii8 (7 commits)")

---

Tags

agnosticlightweightlogloggingphppsr-3logpsr-3filesystemloggererror\_log

### Embed Badge

![Health badge](/badges/maplephp-log/health.svg)

```
[![Health](https://phpackages.com/badges/maplephp-log/health.svg)](https://phpackages.com/packages/maplephp-log)
```

###  Alternatives

[analog/analog

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

3451.5M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k7](/packages/inpsyde-wonolog)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[markrogoyski/simplelog-php

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

2818.1k4](/packages/markrogoyski-simplelog-php)[wa72/simplelogger

Wa72SimpleLogger is a collection of very simple loggers implementing \\Psr\\Log\\LoggerInterface (PSR-3)

13246.6k13](/packages/wa72-simplelogger)

PHPackages © 2026

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