PHP code example of ennnnny / laravel-es-log

1. Go to this page and download the library: Download ennnnny/laravel-es-log 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/ */

    

ennnnny / laravel-es-log example snippets


'channels' => [
    'elastic' => [
        'driver' => 'monolog',
        'handler' => \Monolog\Handler\ElasticsearchHandler::class,
        'handler_with' => [
            'options' => config('es_log.options'),
            'level' => config('es_log.level'),
            'bubble' => config('es_log.bubble')
        ],
        'formatter' => \Eslog\Formatter\EslogFormatter::class,
    ],
],

LOG_CHANNEL=elastic
ELASTICSEARCH_LOG_LEVEL=200
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_SCHEME=http
ELASTICSEARCH_USER=
ELASTICSEARCH_PASS=