PHP code example of verulon / monolog-handler

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

    

verulon / monolog-handler example snippets


'verulon' => [
    'driver' => 'monolog',
    'handler' => \Verulon\Monolog\VerulonHandler::class,
    'handler_with' => [
        'applicationUuid' => env('VERULON_APPLICATION_UUID'),
        'token' => env('VERULON_LOGGING_TOKEN'),
    ],
    'level' => 'debug',
],

use Verulon\Monolog\VerulonHandler;
use Monolog\Logger;

$handler = new VerulonHandler(
    applicationUuid: 'your-application-uuid',
    token: 'your-token',
);

$logger = new Logger('app');
$logger->pushHandler($handler);
$logger->info('Hello, Verulon!');

use Monolog\Handler\BufferHandler;
use Verulon\Monolog\VerulonHandler;

$handler = new BufferHandler(new VerulonHandler($applicationUuid, $token));

LOG_CHANNEL=verulon

LOG_STACK=single,verulon