PHP code example of tomatophp / laravel-logstash

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

    

tomatophp / laravel-logstash example snippets


'logstash' => [
    'driver' => 'custom',
    'via' => \TomatoPHP\LaravelLogstash\Logs\LogStashLogger::class,
    'url' => env('LOGSTASH_HOST'),
    'level' => 'error',
    'queue' => true,
    'queue_connection' => 'redis',
    'queue_name' => 'logs',
],
dotenv
LOG_CHANNEL=stack
LOG_STACK=single,logstash
bash
php artisan vendor:publish --tag="laravel-logstash-config"
bash
composer analyse