[PR #900] [CLOSED] Support for Apache Kafka #1408

Closed
opened 2026-03-04 03:12:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Seldaek/monolog/pull/900
Author: @kozlice
Created: 12/10/2016
Status: Closed

Base: masterHead: kafka


📝 Commits (10+)

  • 8443a0d Initial Kafka support
  • d1c5e76 Edit docs
  • 71a077a Install librdkafka in Travis
  • 6aa6362 Attempt to fix Travis config
  • fb3d849 Attempt to fix Travis config
  • 3dd2b58 Attempt to fix Travis config
  • 5cac42e Attempt to fix Travis config
  • 0457af3 Attempt to fix Travis config
  • 5e67e66 Attempt to fix Travis config
  • e555583 Dedupe extension enabling in Travis

📊 Changes

6 files changed (+204 additions, -1 deletions)

View changed files

📝 .travis.yml (+6 -1)
📝 composer.json (+1 -0)
📝 doc/02-handlers-formatters-processors.md (+1 -0)
src/Monolog/Handler/KafkaHandler.php (+85 -0)
tests/Monolog/Handler/KafkaHandlerTest.php (+76 -0)
tests/install-librdkafka.sh (+35 -0)

📄 Description

Hi,

This is a very simple support for logging into Apache Kafka using rdkafka extension (there are a few libraries for PHP, but this once seems to be most mature and supports Kafka versions 0.8, 0.9 & 0.10).

Tests included, phpunit's coverage report shows 100% for handler.
Travis config updated to install extension from PECL (and librdkafka headers which it requires).
Manually checked that it works with most recent Kafka release (0.10.1).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Seldaek/monolog/pull/900 **Author:** [@kozlice](https://github.com/kozlice) **Created:** 12/10/2016 **Status:** ❌ Closed **Base:** `master` ← **Head:** `kafka` --- ### 📝 Commits (10+) - [`8443a0d`](https://github.com/Seldaek/monolog/commit/8443a0dbbd3af14ff3b9f50a2eed4d845fd6684e) Initial Kafka support - [`d1c5e76`](https://github.com/Seldaek/monolog/commit/d1c5e7699173f6a1fe2da97df840e1735287cee2) Edit docs - [`71a077a`](https://github.com/Seldaek/monolog/commit/71a077aa0ce2053b528083578fce9295c2ad605f) Install librdkafka in Travis - [`6aa6362`](https://github.com/Seldaek/monolog/commit/6aa6362f80eafd2bb0145b4213448acd5efd0468) Attempt to fix Travis config - [`fb3d849`](https://github.com/Seldaek/monolog/commit/fb3d849f5390cb87c41f2fe31fd820abdbe2dd36) Attempt to fix Travis config - [`3dd2b58`](https://github.com/Seldaek/monolog/commit/3dd2b585306bf62e60cf8fec59191530796eae7c) Attempt to fix Travis config - [`5cac42e`](https://github.com/Seldaek/monolog/commit/5cac42e013696c2c358f84abf653da52f8599448) Attempt to fix Travis config - [`0457af3`](https://github.com/Seldaek/monolog/commit/0457af3b91b1b294d18c86f4b6d3f957e8490ce8) Attempt to fix Travis config - [`5e67e66`](https://github.com/Seldaek/monolog/commit/5e67e6632c92f29f7f7ad6d3c4b0a952a014d9bc) Attempt to fix Travis config - [`e555583`](https://github.com/Seldaek/monolog/commit/e55558382d188ccf7c5a17d8ecc91cc24c695d3b) Dedupe extension enabling in Travis ### 📊 Changes **6 files changed** (+204 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+6 -1) 📝 `composer.json` (+1 -0) 📝 `doc/02-handlers-formatters-processors.md` (+1 -0) ➕ `src/Monolog/Handler/KafkaHandler.php` (+85 -0) ➕ `tests/Monolog/Handler/KafkaHandlerTest.php` (+76 -0) ➕ `tests/install-librdkafka.sh` (+35 -0) </details> ### 📄 Description Hi, This is a very simple support for logging into Apache Kafka using [rdkafka extension](https://github.com/arnaud-lb/php-rdkafka) (there are a few libraries for PHP, but this once seems to be most mature and supports Kafka versions 0.8, 0.9 & 0.10). Tests included, phpunit's coverage report shows 100% for handler. Travis config updated to install extension from PECL (and librdkafka headers which it requires). Manually checked that it works with most recent Kafka release (0.10.1). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 03:12:18 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#1408
No description provided.