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

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

phlib/logger
============

Additional Logging Classes

5.0.0(1y ago)1108.4k↓50%[1 issues](https://github.com/phlib/logger/issues)LGPL-3.0PHPPHP ^8.1CI passing

Since Aug 25Pushed 1y ago2 watchersCompare

[ Source](https://github.com/phlib/logger)[ Packagist](https://packagist.org/packages/phlib/logger)[ RSS](/packages/phlib-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (0)

phlib/logger
============

[](#phliblogger)

[![Code Checks](https://camo.githubusercontent.com/4b022980f955ce4108045b8f9dc5b0a47652486ffd0c0c9f2f5dd9a48aaba417/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70686c69622f6c6f676765722f636f64652d636865636b732e796d6c3f6c6f676f3d676974687562)](https://github.com/phlib/logger/actions/workflows/code-checks.yml)[![Codecov](https://camo.githubusercontent.com/644439c388c956b06ecc657e607d6cd8b978cdc829aec242d28ce1592af70cd9/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70686c69622f6c6f676765722e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/phlib/logger)[![Latest Stable Version](https://camo.githubusercontent.com/e19b2274bd09219fc935081cd72924b909d643c8f4add3e40a39e0ab9a95bb33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c69622f6c6f676765722e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/logger)[![Total Downloads](https://camo.githubusercontent.com/acfee6abd6c3654ebe182b5ac5e87ea557cdce7b5185522b180ce99dfe4fcda1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c69622f6c6f676765722e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/logger)[![Licence](https://camo.githubusercontent.com/2d7f04cd6fa71cb6f54aeadfece5801dc7036db85ca5f9c3f1c5eaff75fa705e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f6c6f676765722e737667)](https://camo.githubusercontent.com/2d7f04cd6fa71cb6f54aeadfece5801dc7036db85ca5f9c3f1c5eaff75fa705e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f6c6f676765722e737667)

PHP PSR-3-compatible logger

Install
-------

[](#install)

Via Composer

```
$ composer require phlib/logger
```

Usage
-----

[](#usage)

Example config for a logger pool

```
$loggerConfig = [
    'default' => [ // logger config identifier, used as facility/name in log messages
        // multiple logger entries becomes a collection logger
        [
            // logger type (stream, gelf...)
            'type'  => 'stream',
            // the level of log messages to include (optional)
            'level' => \Psr\Log\LogLevel::ERROR,
             // logger specific parameters
            'path'  => '/var/log/my_app.log'
        ],
        [
            'type'  => 'gelf',
            'level' => \Psr\Log\LogLevel::INFO,
             // logger specific parameters
            'host'  => '127.0.0.1',
            'port'  => 12201
        ]
    ],
    'application' => 'default', // alias to another logger config
    'api' => [
        'type' => 'gelf',
        'host' => '127.0.0.1',
        'port' => 12201
    ]
];
```

Creation of logger pool

```
$loggerPool = new \Phlib\Logger\Pool(
    new \Phlib\Logger\Config($loggerConfig),
    new \Phlib\Logger\Factory()
);
```

Get a logger instance

```
$applicationLogger = $loggerPool->getLogger('application');
// or
$applicationLogger = $loggerPool->application;

$applicationLogger->info('Logging is initialised');
```

License
-------

[](#license)

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance25

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97% 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 ~265 days

Recently: every ~469 days

Total

14

Last Release

471d ago

Major Versions

1.1.0 → 2.0.02016-03-21

2.1.1 → 3.0.02016-10-27

3.0.2 → 4.0.02021-05-31

4.1.1 → 5.0.02025-02-01

PHP version history (3 changes)2.1.0PHP ^5.4|^7

4.0.0PHP ^7.3|^8

5.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/135b7ddf9ec91c412e1b18174f81d1ad2bef66e732624195c156717c96b13731?d=identicon)[letssurf](/maintainers/letssurf)

![](https://www.gravatar.com/avatar/10c53cdcfb3a6d299820aecb993521cc1a972baa09fd8f31d2468908cded7e1d?d=identicon)[chrisminett](/maintainers/chrisminett)

---

Top Contributors

[![chrisminett](https://avatars.githubusercontent.com/u/1084019?v=4)](https://github.com/chrisminett "chrisminett (98 commits)")[![jdempster](https://avatars.githubusercontent.com/u/10297?v=4)](https://github.com/jdempster "jdempster (2 commits)")[![awhale](https://avatars.githubusercontent.com/u/6044970?v=4)](https://github.com/awhale "awhale (1 commits)")

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

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

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

###  Alternatives

[sentry/sentry

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

1.9k227.1M273](/packages/sentry-sentry)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[hedii/laravel-gelf-logger

A Laravel package to send logs to a gelf compatible backend like graylog

1333.4M10](/packages/hedii-laravel-gelf-logger)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[open-telemetry/api

API for OpenTelemetry PHP.

1833.0M214](/packages/open-telemetry-api)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)

PHPackages © 2026

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