PHPackages                             0x20h/monoconf - 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. 0x20h/monoconf

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

0x20h/monoconf
==============

log4j like logging configuration for the monolog framework

0.1.1(13y ago)025.2k↓61.1%MITPHPPHP &gt;=5.3.0

Since Jun 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/0x20h/monoconf)[ Packagist](https://packagist.org/packages/0x20h/monoconf)[ RSS](/packages/0x20h-monoconf/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (6)Used By (0)

Monoconf
========

[](#monoconf)

log4j like configuration for the [monolog](https://github.com/Seldaek/monolog)logging framework.

Usage
-----

[](#usage)

1. Create a config JSON file:

```
{
	"rules": {
        "*": {
            "error": {
                "handler": ["error-handler"]
            }
        },
		"MyApp\\Controller*": {
			"debug": {
                "handler": ["debug-handler"],
                "processor": ["pid"]
            },
            "error": {
                "handler": ["error-handler"]
            }
		}
	},
	"handler": {
		"error-handler": {
			"type": "Monolog\\Handler\\StreamHandler",
			"args": [
				"/my/app/error.log"
			],
			"formatter": "line"
		},
		"debug-handler": {
			"type": "Monolog\\Handler\\StreamHandler",
			"args": [
				"/my/app/application.log"
			],
			"formatter": "line"
		}
	},
    "formatter": {
        "line": {
			"type": "Monolog\\Formatter\\LineFormatter",
			"args": [
				"%datetime% %pid% %channel%@%level_name% %message% %context%\n"
			]
        }
	},
    "processor": {
        "pid": {
            "type": "Monolog\\Processor\\ProcessIdProcessor",
            "args": [
            ]
        }
    }
}
```

2. In your application:

```
require 'vendor/autoload.php';

use Monoconf\Monoconf;

// initialize monoconf
Monoconf::config(json_decode(file_get_contents('monoconf.json'), true));
```

```
namespace MyApp\Controller;

class SomeController {

    protected $Log;

    public function __construct() {
        self::$Log = \Monoconf\Monoconf::getLogger(__CLASS__);
    }

    public function someAction()
    {
        self::$Log->debug(__METHOD__.' called');
    }
}
```

Using this setup every class in the `MyApp\Controller` namespace will get a logger that logs every message up to `debug` to `/my/app/error.log` and every other class will get a logger that logs messages up to `error` to `/my/app/error.log`.

Tests
-----

[](#tests)

```
phpunit --bootstrap tests/bootstrap.php tests/

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

3

Last Release

4774d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/309633?v=4)[Jan Kohlhof](/maintainers/0x20h)[@0x20h](https://github.com/0x20h)

---

Tags

loggingmonolog

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/0x20h-monoconf/health.svg)

```
[![Health](https://phpackages.com/badges/0x20h-monoconf/health.svg)](https://phpackages.com/packages/0x20h-monoconf)
```

###  Alternatives

[inpsyde/wonolog

Monolog-based logging package for WordPress.

184637.3k7](/packages/inpsyde-wonolog)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10823.1k](/packages/naoray-laravel-github-monolog)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.3M](/packages/honeybadger-io-honeybadger-laravel)[logtail/monolog-logtail

Logtail handler for Monolog

243.6M3](/packages/logtail-monolog-logtail)[kdyby/monolog

Integration of Monolog into Nette Framework

32701.2k10](/packages/kdyby-monolog)[inpsyde/logzio-monolog

Logz.io integration for Monolog

191.2M1](/packages/inpsyde-logzio-monolog)

PHPackages © 2026

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