kozlice / monolog-kafka
Apache Kafka handler for Monolog
Installs: 1 099
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 3
Forks: 9
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-rdkafka: >=4.0
- monolog/monolog: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2024-04-27 18:04:21 UTC
README
Support for logging into Apache Kafka using rdkafka extension.
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.