map-ir / laravel-log-usage
log usage service
Installs: 2 702
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1|^8.0
- ext-json: *
- ext-rdkafka: ^6.0
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
README
kafka
elasticSearch
logstash
Installation
You can install the package via composer:
composer require map-ir/laravel-log-usage
laravel Installation
in laravel < 5.4 add this line to your config/app.php providers:
MapIr\LaravelLogUsage\LaravelLogUsageServiceProvider::class,
after install package in laravel run artisan for publish config file
php artisan vendor:publish --tag=config
After publish the package files you must open laravel-log-usage.php in config folder.
lumen Installation:
add package middleware in bootstrap/app.php.
$app->middleware([ \MapIr\LaravelLogUsage\Http\Middleware\LogUsageMiddleware::class ]);
copy package config directory vendor/map-ir/laravel-log-usage/config/logUsage.php
to root folder alongside with app directory.
update bootstrap/app.php by adding this line in Register Config Files
section:
$app->configure('logUsage');
you can set the keys in your .env file
TOPIC="topic name for produce kafka" BROKER_VERSION="version use broker" KAFKA_MRIM="Topic metadata refresh interval in milliseconds broker" REQUIRED_ACK="This field indicates how many acknowledgements the leader broker" IS_ASYNC="Whether to use asynchronous production messages" KAFKA_KEY="key for kafka producer index"
Usage
for config ELK Consumer kafka
Testing
composer test
Security
If you discover any security related issues, please email a.nasiri@map.ir instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.