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

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

programster/log
===============

A library of loggers that comply with PSR-3

2.1.0(3mo ago)01.0k↓85%3MITPHPPHP &gt;=8.2.0

Since Mar 14Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/programster/package-logging)[ Packagist](https://packagist.org/packages/programster/log)[ Docs](https://github.com/programster/package-logging)[ RSS](/packages/programster-log/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (12)Used By (3)

Logger PHP Package
==================

[](#logger-php-package)

This is a [PSR-3](https://www.php-fig.org/psr/psr-3/) compatible logger package that provides some abstract loggers that allow:

- Minimum level logging (MinLevelLogger)
- Logging to multiple loggers (MultiLogger)
- Prefix logging - add a prefix to all messages before logging to the underlying logger.
- File logger - log to a file.

This package provides a PHP enum for the log level to simplify things. Hopefully the PSR-3 package will provide this itself at some point in the future.

You will likely want to take advantage of one of the following additional logging packages that make use of this package.

- [PostgreSQL Logger](https://github.com/programster/package-pgsql-logger)- log to a PostgreSQL database.
- [MySQL Logger](https://github.com/programster/package-mysql-logger) - log to a MySQL database.
- [Email Logger](https://github.com/programster/package-email-logger) - send logs to any number of email addresses.

Install
-------

[](#install)

```
composer require programster/log
```

Example Usage
-------------

[](#example-usage)

```
/**
 * Get a logger for logging all the things.
 * @return \Psr\Log\LoggerInterface
 */
public function getLogger() : \Psr\Log\LoggerInterface
{
    return new \Programster\Log\FileLogger(filepath: "/path/to/my/logs.csv");
}
```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance79

Regular maintenance activity

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity76

Established project with proven stability

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

Recently: every ~481 days

Total

10

Last Release

112d ago

Major Versions

1.2.3 → 2.0.02023-04-25

PHP version history (3 changes)1.0.0PHP &gt;=7.2.0

2.0.0PHP &gt;=8.1.0

2.1.0PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/64a048ca8be761aced9419279975a21ef679b71c70d8263bc2fc413a87ad381c?d=identicon)[programster](/maintainers/programster)

---

Top Contributors

[![programster](https://avatars.githubusercontent.com/u/5709838?v=4)](https://github.com/programster "programster (26 commits)")

---

Tags

loglogging

### Embed Badge

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

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

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k1.0B8.2k](/packages/monolog-monolog)[sentry/sentry

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

1.9k247.1M334](/packages/sentry-sentry)[nelmio/js-logger-bundle

Adds logging of JS errors in your Symfony application

1791.3M](/packages/nelmio-js-logger-bundle)[league/tactician-logger

Adds PSR-3 logging support to the Tactician command bus

649.9M10](/packages/league-tactician-logger)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)[cakephp/log

CakePHP logging library with support for multiple different streams

267.8M14](/packages/cakephp-log)

PHPackages © 2026

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