PHP code example of jojihere / monolog-fluent

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

    

jojihere / monolog-fluent example snippets



use FluentHandler\FluentHandler;
use Monolog\Logger;

$logger = new Logger('Logger');
$logger->pushHandler(new FluentHandler());

$logger->debug('tag', ['test' => 'data']);


$logger = new Logger('Logger');
$logger->pushHandler(new FluentHandler(null, '127.0.0.1', 24224));


$fluent = new FluentLogger("localhost", 24224);
$logger = new Logger('Logger');
$logger->pushHandler(new FluentHandler($fluent));