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

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

linkorb/flex-log
================

Simple wrapper around monolog-cascade adding practical utilities

v1.0.1(3y ago)01.1k11MITPHP

Since Apr 26Pushed 3y ago2 watchersCompare

[ Source](https://github.com/linkorb/flex-log)[ Packagist](https://packagist.org/packages/linkorb/flex-log)[ RSS](/packages/linkorb-flex-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

flex-log
========

[](#flex-log)

FlexLog: flexible configurable logging for your applications

Allows reconfiguring the handlers, processor and formatters of your application's loggers through environment variables and config files.

FlexLog is a very thin wrapper around the awesome [monolog-cascade](https://github.com/theorchard/monolog-cascade) library.

It adds:

- simple initialization based on the config file specified by the `FLEX_LOG` environment variable
- ensures that all loggers your application expects are always added to Monolog's Registry, even if no cascade config file is used, or it misses a definition for that logger name.

Configuration
-------------

[](#configuration)

```
## Specify a cascade config file (yaml):
FLEX_LOG=/path/to/my/cascade.yaml

```

Usage
-----

[](#usage)

At the earliest entry point in your application (index.php, bootstap.php, etc), add the following line to initialize FlexLog:

```
use FlexLog\FlexLog;

FlexLog::initFromEnv()
FlexLog::ensureLoggers(['app', 'db', 'caching']); // ensures that loggers with these names exist and are registered
```

Then, from anywhere in your app, log to monolog as usual. For example by using Monolog's registry:

```
$username = 'joe';
\Monolog\Registry::app()->info("User {username} logged in", ['username' => $username]);
```

A fully working example can be found in the test cases in `tests/`

Tests
-----

[](#tests)

```
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/

```

Links
-----

[](#links)

- [Monolog Cascade](https://github.com/theorchard/monolog-cascade)
- [Monolog](https://github.com/Seldaek/monolog)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~1379 days

Total

2

Last Release

1201d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (2 commits)")[![prajapati-kaushik](https://avatars.githubusercontent.com/u/10140681?v=4)](https://github.com/prajapati-kaushik "prajapati-kaushik (1 commits)")

---

Tags

flexPSR3monologmonolog-cascade

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[maxbanton/cwh

AWS CloudWatch Handler for Monolog library

42515.3M27](/packages/maxbanton-cwh)[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)[lefuturiste/monolog-discord-handler

A simple monolog handler for support Discord webhooks

34111.6k4](/packages/lefuturiste-monolog-discord-handler)[phpnexus/cwh

AWS CloudWatch Handler for Monolog library

393.2M7](/packages/phpnexus-cwh)[bitrix-expert/monolog-adapter

Monolog adapter for Bitrix CMS

6566.3k](/packages/bitrix-expert-monolog-adapter)

PHPackages © 2026

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