PHP code example of chameleon / laravel-gelf

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

    

chameleon / laravel-gelf example snippets


 'graylog' => [
     'driver'     => 'laravel-gelf',
     'level'      => 'debug',
     'facility'   => 'laravel',
    //'formatter' => \Monolog\Formatter\GelfMessageFormatter::class,
     'connection' => [
         'type' => 'udp', // or tcp
         'host' => '127.0.0.1'
         'port' => 12201
     ],
     //additional fields
     'additional' => [
         'from_php' => true
     ]
 ],