PHP code example of maksimru / laravel-fluent-logger

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

    

maksimru / laravel-fluent-logger example snippets


'providers' => [
    \Ytake\LaravelFluent\LogServiceProvider::class,
]

'fluent' => [
    'driver' => 'fluent',
],

'providers' => [
    //
    \Ytake\LaravelFluent\LogServiceProvider::class,
],



namespace App\Foundation;

use Monolog\Logger;
use Fluent\Logger\FluentLogger;
use Ytake\LaravelFluent\FluentHandler;

class Application extends \Laravel\Lumen\Application
{
    /**
     * @return FluentHandler
     */
    protected function getMonologHandler()
    {
        return new FluentHandler(
            new FluentLogger(env('FLUENTD_HOST', '127.0.0.1'), env('FLUENTD_PORT', 24224), []),
            Logger::DEBUG
        );
    }
}

bash
$ php artisan vendor:publish
bash
$ php artisan vendor:publish --tag=log
bash
$ php artisan vendor:publish --provider="Ytake\LaravelFluent\LogServiceProvider"