PHP code example of alexkratky / loggerx

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

    

alexkratky / loggerx example snippets




use AlexKratky\Logger;
use AlexKratky\Cache;

Logger::setDirectory(__DIR__ . '/logs/');
Cache::setDirectory(__DIR__ . '/logs/');

if(Logger::log("text") !== false) {
    // data was written successfully
} else {
    // data was not written successfully
}