PHPackages                             patrickmaken/kafka-log-driver - 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. patrickmaken/kafka-log-driver

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

patrickmaken/kafka-log-driver
=============================

Laravel, log driver for Kafka

4.0(1y ago)01.1kMITPHPPHP ^8.1

Since Oct 27Pushed 1y agoCompare

[ Source](https://github.com/patrickmaken/kafka-log-driver)[ Packagist](https://packagist.org/packages/patrickmaken/kafka-log-driver)[ Docs](https://github.com/patrickmaken/kafka-log-driver)[ RSS](/packages/patrickmaken-kafka-log-driver/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Laravel log driver for Kafka
============================

[](#laravel-log-driver-for-kafka)

Requirements:
-------------

[](#requirements)

- PHP 8.1, 8.2
- Laravel 9, 10
- rdkafka php extension v.6

```
sudo pecl install rdkafka
```

Add the following line to your php.ini file:

```
extension=rdkafka.so

```

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

[](#installation)

You can install the package via composer:

```
composer require patrickmaken/kafka-log-driver
```

For Laravel 9

```
composer require patrickmaken/kafka-log-driver:1.0
```

You can publish the config file with:

```
php artisan vendor:publish --tag="kafka-log-driver-config"
```

This is the contents of the published config file (kafka\_log.php):

```
return [
    // topic name
    'topic'         => env('KAFKA_LOG_FILE_TOPIC'),
    // kafka brokers - "10.0.0.1,10.0.0.2"
    'brokers'       => env('KAFKA_LOG_BROKERS'),
    // timeout - ms
    'flush_timeout' => env('KAFKA_LOG_FLUSH_TIMEOUT', 100)
];
```

Usage
-----

[](#usage)

Add to `.env`

```
KAFKA_LOG_FILE_TOPIC=
KAFKA_LOG_BROKERS=
// if you want to change the default value (100 ms)
KAFKA_LOG_FLUSH_TIMEOUT=

```

Add to `config/logging.php`

```
'channels' => [
    ...
    'kafka' => [
        'driver' => 'custom',
        'via' => Patrickmaken\KafkaLogDriver\KafkaLogger::class,
    ],
    ...
],
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance47

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~107 days

Total

3

Last Release

400d ago

Major Versions

3.1 → 4.02025-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cd2c51ac8256eafd720a521fc47e3a195f5e3caf61446bc9d73e3d27aa4f151?d=identicon)[patrickbalemaken](/maintainers/patrickbalemaken)

---

Top Contributors

[![alexusmai](https://avatars.githubusercontent.com/u/7473505?v=4)](https://github.com/alexusmai "alexusmai (3 commits)")[![patrickmaken](https://avatars.githubusercontent.com/u/42263643?v=4)](https://github.com/patrickmaken "patrickmaken (1 commits)")

---

Tags

loglaraveldriverkafkapatrickmaken

### Embed Badge

![Health badge](/badges/patrickmaken-kafka-log-driver/health.svg)

```
[![Health](https://phpackages.com/badges/patrickmaken-kafka-log-driver/health.svg)](https://phpackages.com/packages/patrickmaken-kafka-log-driver)
```

###  Alternatives

[illuminate/log

The Illuminate Log package.

6225.3M622](/packages/illuminate-log)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[mateusjunges/laravel-kafka

A kafka driver for laravel

7253.6M20](/packages/mateusjunges-laravel-kafka)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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