PHPackages                             midweste/simplelogger - 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. midweste/simplelogger

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

midweste/simplelogger
=====================

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

v2.0.1(5y ago)0894MITPHPPHP &gt;=5.4

Since Mar 6Pushed 5y agoCompare

[ Source](https://github.com/midweste/simplelogger)[ Packagist](https://packagist.org/packages/midweste/simplelogger)[ Docs](http://github.com/midwest/simplelogger)[ RSS](/packages/midweste-simplelogger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

SimpleLogger (collection of PHP logger classes) - Forked from/Credits to wasinger/simplelogger
=========================================================================================================================================

[](#simplelogger-collection-of-php-logger-classes---forked-fromcredits-to-wasingersimplelogger-httpsgithubcomwasingersimplelogger)

SimpleLogger is a collection of very simple logger classes for PHP 5.4 implementing \\Psr\\Log\\LoggerInterface (PSR-3), the common logger interface standardized by the PHP Framework Interop Group ([www.php-fig.org](http://www.php-fig.org)).

SimpleLogger is intended for small projects or testing purposes if you don't need a full-featured logging solution like Monolog.

If you just need to output a few log messages in a small PHP project but want to stick to the PSR-3 standard this package is for you. When your project grows you can simply replace it by a more advanced logging solution like Monolog.

Loggers
-------

[](#loggers)

- \\Midweste\\SimpleLogger\\EchoLogger: Just echo the log message
- \\Midweste\\SimpleLogger\\FileLogger: Log to a file
- \\Midweste\\SimpleLogger\\ArrayLogger: Keep log messages in an array for later use (e.g. display it to the user)
- \\Midweste\\SimpleLogger\\SessionLogger: Keep log messages in a session for later use (e.g. display it to the user on another page)
- \\Midweste\\SimpleLogger\\ConsoleLogger: Log to the Symfony2 console =&gt; *DEPRECATED: use `Symfony\Component\Console\Logger\ConsoleLogger` instead*

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

[](#installation)

- `composer require midweste/simplelogger`

Usage
-----

[](#usage)

```
$logger = new \Midweste\SimpleLogger\FileLogger('/path/to/logfile');
$logger->info('This is the first log message');
```

**NEW**: it's now possible to set a minimum log level in the constructor of FileLogger, EchoLogger and ArrayLogger:

```
$logger = new \Midweste\SimpleLogger\FileLogger('/path/to/logfile', \Psr\Log\LogLevel::ERROR);
$logger->info('This is the first log message'); // this message will be discarded
$logger->error('This is an error message'); // this message will be logged
```

In one of my projects there was a "fetcher" class that fetched some information from a web service. It needed to log whether this fetch was successfull or not and how many data it fetched. It could be invoked either from the command line, by a background task, or by a user in the admin web page of the application. This was the use case for three logger classes:

- the fetcher class itself just logs to any PSR-3 compliant logger
- if called from a background task (cronjob), it is given a FileLogger
- if called from the command line, it is given a ConsoleLogger
- if called from the web interface, it is given an ArrayLogger. The output of this logger is then displayed to the user on the web page.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~704 days

Total

4

Last Release

1977d ago

Major Versions

v1.1.1 → v2.0.12020-12-17

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

v1.1.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2df4ed3abb19aaf4771d0bc1b64769b21ae06929b32165560884f545fb80d0af?d=identicon)[midwestE](/maintainers/midwestE)

---

Top Contributors

[![midweste](https://avatars.githubusercontent.com/u/6331501?v=4)](https://github.com/midweste "midweste (2 commits)")[![fdisotto](https://avatars.githubusercontent.com/u/3002528?v=4)](https://github.com/fdisotto "fdisotto (1 commits)")[![harikt](https://avatars.githubusercontent.com/u/120454?v=4)](https://github.com/harikt "harikt (1 commits)")

---

Tags

logpsr-3logger

### Embed Badge

![Health badge](/badges/midweste-simplelogger/health.svg)

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

###  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)
