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

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

pollen-solutions/log
====================

Pollen Solutions - Log Component - Monolog PSR-3 logging implementation.

v1.0.1(4y ago)0486MITPHPPHP ^7.4 || ^8.0

Since Aug 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/pollen-solutions/log)[ Packagist](https://packagist.org/packages/pollen-solutions/log)[ Docs](https://www.presstify.com/pollen-solutions/log/)[ RSS](/packages/pollen-solutions-log/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

Log Component
=============

[](#log-component)

[![Latest Stable Version](https://camo.githubusercontent.com/9bb91a3f534b91356399b6d648c45ffcb2633c889d44ecb936c9c67defecd395/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f6c6c656e2d736f6c7574696f6e732f6c6f672e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pollen-solutions/log)[![MIT Licensed](https://camo.githubusercontent.com/daa52099573be5a50c320c4387496400f2f722e49f86a42db8d5778130d3582d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d666f722d7468652d6261646765)](LICENSE.md)[![PHP Supported Versions](https://camo.githubusercontent.com/d9d71d0b69072c51e1ff7adfdb6270f896f75787500ce6437120e23727c081d1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d372e342d3838393242463f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://www.php.net/supported-versions.php)

Pollen Solutions **Log** Component provides a PSR-3 logging implementation based on Monolog.

Installation
------------

[](#installation)

```
composer require pollen-solutions/log
```

Basic Usage
-----------

[](#basic-usage)

```
use Pollen\Log\LogManager;

$log = new LogManager();

// Adds a log record at the DEBUG level
$log->debug('My debug message');

// Adds a log record at the INFO level
$log->debug('My info message');

// Adds a log record at the SUCCESS level
$log->success('My success message');

// Adds a log record at the NOTICE level
$log->notice('My notice message');

// Adds a log record at the WARNING level
$log->warning('My warning message');

// Adds a log record at the ERROR level
$log->error('My error message');

// Adds a log record at the CRITICAL level
$log->critical('My critical message');

// Adds a log record at the ALERT level
$log->alert('My alert message');

// Adds a log record at the EMERGENCY level
$log->emergency('My alert message');

```

Log storage path
----------------

[](#log-storage-path)

By default, if none specific handler is specified, the log manager uses the Monolog RotatingFileHandler. It stores a log file in the app public dir. It is recommended to change it to a more suitable path with appropriate write file permissions.

```
use Pollen\Log\LogManager;

$log = (new LogManager())->setDefaultStoragePath('/var/log/myapp');
```

Create a built-in channel and use it
------------------------------------

[](#create-a-built-in-channel-and-use-it)

Like the default log channel, the built-in channel uses the RotatingFileHandler and LineFormatter. But you can customizes some of its parameters.

```
use Pollen\Log\Logger;
use Pollen\Log\LogManager;

$log = new LogManager();

$log->registerChannel('my-channel', [
       /**
        * Log filename (relative or absolute).
        * @see \Monolog\Handler\RotatingFileHandler
        * @var string|null
        */
        'filename' => null,
       /**
        * Rotation frequency.
        * @see \Monolog\Handler\RotatingFileHandler
        * @var int|null
        */
       'rotate' => null,
       /**
        * Minimum logging level.
        * @see \Monolog\Handler\RotatingFileHandler
        * @var string|null
        */
        'level'  => Logger::SUCCESS,
       /**
        * Line format.
        * @see \Monolog\Formatter\LineFormatter
        * @var string|null
        */
      'format' => null,
       /**
        * Date format.
        * @see \Monolog\Formatter\LineFormatter
        * @var string|null
        */
      'date_format' => null
]);

$log->channel('my-channel')->success('Test log success message');
```

Create your own custom channel
------------------------------

[](#create-your-own-custom-channel)

Monolog purposes a large variety of [handlers](https://github.com/Seldaek/monolog/blob/main/doc/02-handlers-formatters-processors.md#handlers)and [formatters](https://github.com/Seldaek/monolog/blob/main/doc/02-handlers-formatters-processors.md#formatters). You might need to use your own suit and use it in Pollen Solutions Log Component.

```
use Monolog\Handler\NativeMailerHandler;
use Pollen\Log\Logger;
use Pollen\Log\LogManager;

$log = new LogManager();

$channel = new Logger(
    'mailer',
    [new NativeMailerHandler('to@domain.ltd', 'You have a log report message !', 'from@domain.ltd')]
);

$log->addChannel($channel);

$log->channel('mailer')->error('Test log error message');
```

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

3

Last Release

1684d ago

### Community

Maintainers

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

---

Top Contributors

[![jordy-manner](https://avatars.githubusercontent.com/u/733356?v=4)](https://github.com/jordy-manner "jordy-manner (2 commits)")

---

Tags

psr-3logginglogscomponentpollen-solutions

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[analog/analog

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

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

Monolog-based logging package for WordPress.

183610.5k3](/packages/inpsyde-wonolog)[nvanheuverzwijn/monolog-logdna

Mezmo/Logdna handler for Monolog

21225.5k2](/packages/nvanheuverzwijn-monolog-logdna)[filips123/monolog-phpmailer

PHPMailer handler for Monolog

1363.4k2](/packages/filips123-monolog-phpmailer)[alexandre-daubois/monolog-processor-collection

A collection of Monolog processors

1516.3k](/packages/alexandre-daubois-monolog-processor-collection)[kozlice/monolog-kafka

Apache Kafka handler for Monolog

171.7k](/packages/kozlice-monolog-kafka)

PHPackages © 2026

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