Skip to content

kozlice/monolog-kafka

Repository files navigation

Apache Kafka handler for Monolog

Build Status

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.

About

Kafka handler for Monolog

Resources

License

Stars

Watchers

Forks

Packages

No packages published