PHP code example of bera / logger

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

    

bera / logger example snippets



$log = new Bera\Joy\Logger('log.txt',__DIR__);
$log->log('Hello World'); 
// 2020-04-14 13:10:07 :: INFO :: Hello World 


$log = new Bera\Joy\Logger('log.txt',__DIR__);
$log->log('Hello World' , 'ERROR'); 
// 2020-04-13 13:10:07 :: ERROR :: Hello World