pavel-marachkov/laravel-elk-log

Integrate laravel with elastic search for sending all logs to elastic search

3.0.3 2021-09-16 11:39 UTC

This package is auto-updated.

Last update: 2025-04-16 19:46:03 UTC


README

This package is fork from ahmedofali/laravel-elk-log. That package is a simple initializer of elasticsearch logs for Kibana with laravel.

Installation

Install the package via composer:

composer require pavel-marachkov/laravel-elk-log

Usage

Run the below command to get installation tips.

php artisan elk:installTips

Merge this with logging.php config file

return [

    'channels' => [
        'elastic' => [
            'driver' => 'monolog',
            'handler' => ElkHandler::class,
            'level' => 'notice',
            'formatter' => KibanaFormatter::class
        ],
    ],

];

After you publish config file you will find new config file called elk.php add your environment configuration, and you are ready to go with elasticsearch.

Credits