PHP code example of codingduck / monolog-plugin

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

    

codingduck / monolog-plugin example snippets

 
use Codingduck\Logger\CodingDuckLogger;

$factory = new CodingDuckLogger;

$logger = $factory($config);

$logger->info("Hello world!");


return [
    'default' => env('LOG_CHANNEL', 'codingDuck'),
    
    'channels' => [
        'codingDuck' => [
            'driver' => 'custom',
            'via' => \Codingduck\Logger\CodingDuckLogger::class,
            [... $config]
        ]
    ],
];