PHP code example of hhxsv5 / laravel-kafka-logger
1. Go to this page and download the library: Download hhxsv5/laravel-kafka-logger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hhxsv5 / laravel-kafka-logger example snippets
return [
'channels' => [
// ...
'kafka' => Hhxsv5\LKL\KafkaLogger::getDefinition(['topic' => env('LOG_KAFKA_TOPIC', 'laravel-logs')]),
],
];
LOG_CHANNEL=kafka
LOG_KAFKA_BROKER_LIST=kafka:9092
LOG_KAFKA_TOPIC=laravel-logs