PHP code example of lf4php / lf4php-log4php

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

    

lf4php / lf4php-log4php example snippets



Logger::configure('config.xml');


$logger = LoggerFactory::getLogger(__CLASS__);
$logger->info('Message');
$logger->debug('Hello {}!', array('John'));
$logger->error(new \Exception());