PHP code example of makopov / simple-log

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

    

makopov / simple-log example snippets


$oLogger = SLog::getInstance();

$oLogger->setApplicationName('MyApp');

$oLogger->emergency('some message');
$oLogger->alert('some message');
$oLogger->critical('some message');
$oLogger->error('some message');
$oLogger->warning('some message');
$oLogger->notice('some message');
$oLogger->info('some message');
$oLogger->debug('some message');

function foo() {
    $oLogger->warning('something happened');
}