1 Star 0 Fork 0

谢彪 / laravel-kafka-logger

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

laravel-kafka-logger

The Kafka logger for Laravel.

Latest Version PHP Version Total Downloads License

Requirements

Dependency Requirement
php-rdkafka >=4.0.0

Install

1.Install rdkafka.

git clone --depth 1 https://github.com/edenhill/librdkafka.git /tmp/librdkafka && cd /tmp/librdkafka && ./configure && make -j$(nproc) && make install && rm -rf /tmp/librdkafka
pecl install rdkafka

2.Install laravel-kafka-logger.

# Laravel 5.x
composer require "hhxsv5/laravel-kafka-logger:~1.0.0"
# Laravel 6.x & 7.x
composer require "hhxsv5/laravel-kafka-logger:~2.0.0"

Get Started

1.Modify config/logging.php.

return [
    'channels' => [
        // ...
        'kafka' => Hhxsv5\LKL\KafkaLogger::getDefinition(['topic' => env('LOG_KAFKA_TOPIC', 'laravel-logs')]),
    ],
];

2.Modify .env.

LOG_CHANNEL=kafka
LOG_KAFKA_BROKER_LIST=kafka:9092
LOG_KAFKA_TOPIC=laravel-logs

License

MIT

Comments ( 0 )

Sign in for post a comment

About

The Kafka logger for Laravel. spread retract
Cancel

Releases

No release

laravel-kafka-logger

Contributors

All

Activities

load more
can not load any more
PHP
1
https://gitee.com/hhxsv5/laravel-kafka-logger.git
git@gitee.com:hhxsv5/laravel-kafka-logger.git
hhxsv5
laravel-kafka-logger
laravel-kafka-logger
master

Search

102255 3a0e046c 1850385 102255 7aaa926c 1850385