PHP code example of khalilleo-webagentur / monolog

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

    

khalilleo-webagentur / monolog example snippets



// create this service as entry point



declare(strict_types=1);

namespace App\Service\Core;

use Khalilleo\Monolog\LoggerAbstruct;

final class MonologService extends LoggerAbstruct
{
    //
}



// call your service 

use App\Service\MonologService;

public function __construct(private readonly MonologService $monolog) {}


// use monolog

$this->monolog->logger->info('any message ..');
$this->monolog->logger->debug('any message ..');
.
.