PHPackages                             php-pico/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. php-pico/logger

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

php-pico/logger
===============

PSR-3 compliant logger package.

0.3.3(1w ago)05MITPHPPHP ^8.5

Since Dec 10Pushed 1w agoCompare

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

READMEChangelog (6)Dependencies (6)Versions (7)Used By (0)

php-pico/logger
===============

[](#php-picologger)

PSR-3 compliant logging package.

Message format
--------------

[](#message-format)

Messages are formatted as `Y-m-d H:i:s [level] message`, where `level` is the raw lowercase PSR-3 level:

```
2026-06-22 14:30:45 [info] User signed in: 1234

```

Context interpolation
---------------------

[](#context-interpolation)

When logging, you can pass a `$context` key-value map to the `log()` method. This will be interpolated into the message replacing the matching placeholders in the message:

```
$level   = \Psr\Log\LogLevel::DEBUG;
$message = 'User {userId} signed in from {userIp}';
$context = [
    'userId' => 1,
    'userIp' => '127.0.0.1',
];

// Logs: "User 1 signed in from 127.0.0.1"
$logger->log($level, $message, $context);
```

Logging engines
---------------

[](#logging-engines)

Every engine is PSR-3 compliant and implements the `Psr\Log\LoggerInterface`.

EngineProductionNotes`FileLogger`YesLogs/append to a file.`StderrLogger`YesLogs to `stderr`.`TestLogger`NoKeeps logs in-memory. Useful for testing.### FileLogger

[](#filelogger)

Appends entries to a file, creating it if it does not exist. Entries are separated by `$newLines` blank lines (default `2`; a value below `1` throws `InvalidArgumentException`).

```
use PhpPico\Logger\FileLogger;

$path     = __DIR__ . '/logs';
$file     = 'app.log';
$newLines = 2;

$logger = new FileLogger($path, $file, $newLines);
```

Constructor: `__construct(string $path, string $file, int $newLines = 2)`

### StderrLogger

[](#stderrlogger)

Writes formatted messages to `php://stderr`. Takes no constructor arguments.

```
use PhpPico\Logger\StderrLogger;

$logger = new StderrLogger();
```

### TestLogger

[](#testlogger)

Stores entries in memory instead of writing them anywhere. Intended for use in tests, where you assert against what was logged. Takes no constructor arguments.

```
use PhpPico\Logger\TestLogger;

$logger = new TestLogger();

// Get logs stored
$logger->getLogs();

// Flush the logs (down the toilet)
$logger->flush();
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance84

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Recently: every ~0 days

Total

6

Last Release

10d ago

PHP version history (2 changes)0.1.0PHP ^8.4

0.2.0PHP ^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33836112?v=4)[Kevin From](/maintainers/kevinfrom)[@kevinfrom](https://github.com/kevinfrom)

---

Top Contributors

[![kevinfrom](https://avatars.githubusercontent.com/u/33836112?v=4)](https://github.com/kevinfrom "kevinfrom (27 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-pico-logger/health.svg)

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k247.1M335](/packages/sentry-sentry)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.3k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M623](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k51](/packages/ecotone-ecotone)

PHPackages © 2026

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