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

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

kozlice/monolog-kafka
=====================

Apache Kafka handler for Monolog

v2.0.0(4y ago)161.7k10MITPHPPHP ^7.4 || ^8.0

Since Dec 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kozlice/monolog-kafka)[ Packagist](https://packagist.org/packages/kozlice/monolog-kafka)[ Docs](https://github.com/kozlice/monolog-kafka)[ RSS](/packages/kozlice-monolog-kafka/feed)WikiDiscussions master Synced 1mo ago

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

[Apache Kafka](https://kafka.apache.org/) handler for [Monolog](https://github.com/Seldaek/monolog)
===================================================================================================

[](#apache-kafka-handler-for-monolog)

[![Build Status](https://camo.githubusercontent.com/9c504598f3e9f6ad0f31c063db9c1dbc681fc55c0666f74eea05ce7aeaff6088/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6b6f7a6c6963652f6d6f6e6f6c6f672d6b61666b612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kozlice/monolog-kafka)

Support for logging into Apache Kafka using [rdkafka extension](https://github.com/arnaud-lb/php-rdkafka).

Usage example:

```
$config = new \RdKafka\Conf();
$config->set('metadata.broker.list', '127.0.0.1');
$producer = new \RdKafka\Producer($config);
$logger = new Logger('my_logger');
$logger->pushHandler(new KafkaHandler($producer, 'test'));
```

Works with:

- PHP 7.4+ with PECL rdkafka 4.x/5.x
- PHP 8+ with PECL rdkafka 5.x

Manually tested with Apache Kafka 2.8.0.

If you need support for earlier versions of PHP or rdkafka extension, please check out the `v1.0.1` tag.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

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

Total

3

Last Release

1787d ago

Major Versions

v1.0.1 → v2.0.02021-06-27

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

v2.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/747947?v=4)[Valentin Nazarov](/maintainers/kozlice)[@kozlice](https://github.com/kozlice)

---

Top Contributors

[![dzuelke](https://avatars.githubusercontent.com/u/27900?v=4)](https://github.com/dzuelke "dzuelke (2 commits)")[![kozlice](https://avatars.githubusercontent.com/u/747947?v=4)](https://github.com/kozlice "kozlice (1 commits)")

---

Tags

logpsr-3loggingkafkaapache kafka

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[monolog/monolog

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

21.4k964.9M7.0k](/packages/monolog-monolog)[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)[nvanheuverzwijn/monolog-logdna

Mezmo/Logdna handler for Monolog

21231.3k2](/packages/nvanheuverzwijn-monolog-logdna)[elastic/ecs-logging

Format and enrich your log files in the elastic common schema

21907.5k1](/packages/elastic-ecs-logging)

PHPackages © 2026

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