PHPackages                             mrtnzlml/monolog - 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. mrtnzlml/monolog

Abandoned → [adeira/monolog](/?search=adeira%2Fmonolog)ArchivedLibrary[Logging &amp; Monitoring](/categories/logging)

mrtnzlml/monolog
================

v1.0.1(9y ago)1980[1 issues](https://github.com/mrtnzlml/monolog/issues)BSD-3-ClausePHPPHP &gt;=5.6.0

Since Aug 4Pushed 8y agoCompare

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

READMEChangelogDependencies (4)Versions (3)Used By (0)

> At this moment I don't have time, energy and money to maintain this project. But it's a shame so if you depend on this project and you want to become a sponsor or develop it further please don't hesitate to contact me. Otherwise, I am not able to guarantee bright future of this repo... :)

More awesome Monolog for Nette Framework
========================================

[](#more-awesome-monolog-for-nette-framework)

[![Build Status](https://camo.githubusercontent.com/7bdee0d10cd3b5458b1772bd0fb6372181dc10ee28c00ff83ba5292ff32b42c5/68747470733a2f2f7472617669732d63692e6f72672f6164656972612f6d6f6e6f6c6f672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/adeira/monolog)

This package is extending [Kdyby\\Monolog](https://github.com/Kdyby/Monolog) to make it more flexible, configurable and awesome.

Inspiration:

- [Logging with Monolog](http://symfony.com/doc/current/logging.html)
- [How to Log Messages to different Files](http://symfony.com/doc/current/logging/channels_handlers.html)
- [Configure multiple loggers and handlers](https://github.com/theorchard/monolog-cascade)

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

[](#installation)

```
composer require adeira/monolog

```

And register DI extension in `config.neon`:

```
extensions:
	monolog: Adeira\Monolog\DI\MonologExtension

```

Default configuration
---------------------

[](#default-configuration)

Package `adeira/monolog` brings a lot of [formatters](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#formatters) and [processors](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#processors) by default. This means you can use them only by name. Here is the complete list of defaults:

```
formatters:
	chromePHP: Monolog\Formatter\ChromePHPFormatter
	fluentd: Monolog\Formatter\FluentdFormatter
	gelfMessage: Monolog\Formatter\GelfMessageFormatter
	html: Monolog\Formatter\HtmlFormatter
	json: Monolog\Formatter\JsonFormatter
	line: Monolog\Formatter\LineFormatter
	loggly: Monolog\Formatter\LogglyFormatter
	mongoDB: Monolog\Formatter\MongoDBFormatter
	normalizer: Monolog\Formatter\NormalizerFormatter
	dcalar: Monolog\Formatter\ScalarFormatter
	wildfire: Monolog\Formatter\WildfireFormatter

processors:
	git: Monolog\Processor\GitProcessor
	introspection: Monolog\Processor\IntrospectionProcessor
	memoryPeakUsage: Monolog\Processor\MemoryPeakUsageProcessor
	memoryUsage: Monolog\Processor\MemoryUsageProcessor
	processId: Monolog\Processor\ProcessIdProcessor
	psrLogMessage: Monolog\Processor\PsrLogMessageProcessor
	tag: Monolog\Processor\TagProcessor
	uid: Monolog\Processor\UidProcessor
	web: Monolog\Processor\WebProcessor

handlers:
	errorLog:
		class: Monolog\Handler\ErrorLogHandler

loggers:
	global:
		class: Kdyby\Monolog\Logger # including custom global handlers and processors

```

**You DON'T have to copy paste this into your config file. This is just a quick reference so you can find what you want quickly.**

Overriding configuration
------------------------

[](#overriding-configuration)

Every formatter and processor uses default configuration if possible. If you want custom configuration, it's easy to override it like this:

```
monolog:
	processors:
		web: Monolog\Processor\WebProcessor(NULL, [
				ip: REMOTE_ADDR,
				userAgent: HTTP_USER_AGENT,
			])

```

Changing global logger configuration and adding own loggers
-----------------------------------------------------------

[](#changing-global-logger-configuration-and-adding-own-loggers)

As you already know - this package extends kdyby\\monolog. And there is default global logger for whole application. You can configure it by using `global` name in `loggers` section. Another loggers will be registered independently (with name or anonymously):

```
monolog:
	handlers:
		slack:
			class: Adeira\Monolog\Handler\SlackHandler(
				%productionMode%,
				%slack.token%,
				%slack.channel%,
				%slack.username%,
				%slack.useAttachment%,
				%slack.iconEmoji%,
				%slack.level%,
				%slack.bubble%,
				%slack.useShortAttachment%,
				%slack.includeContextAndExtra%
			)
	loggers:
		global: # global logger from Kdyby (\Kdyby\Monolog\Logger)
			handlers: [slack]
			processors: [git, introspection, web]
		- class: Custom\Monolog\Loggers\UsersAuditLogger
		  handlers: [database]

```

This way you can setup a lot of loggers with different configuration (handlers, processors, formatter). Your custom loggers are like services in DI container so you can use autowiring to get them. Nothing special. Remember, that it's good idea to extend these custom loggers from `\Monolog\Logger` or even better from `\Kdyby\Monolog\Logger`.

Using Kdyby configuration options
---------------------------------

[](#using-kdyby-configuration-options)

Package `adeira/monolog` is not playing with Kdyby configuration so you can use it if you want to without changes:

```
monolog:
	hookToTracy: yes
	registerFallback: yes
	usePriorityProcessor: yes

```

Awesome right? :)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3546d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe97c047b464c8f8f3a46dcc5034a5eb0b11edd91328a4c0e101aa2044dab80f?d=identicon)[mrtnzlml](/maintainers/mrtnzlml)

---

Top Contributors

[![mrtnzlml](https://avatars.githubusercontent.com/u/978368?v=4)](https://github.com/mrtnzlml "mrtnzlml (17 commits)")

---

Tags

formatterhandlermonolognette-frameworkprocessor

### Embed Badge

![Health badge](/badges/mrtnzlml-monolog/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M263](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M317](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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