1. Go to this page and download the library: Download ialopezg/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/ */
ialopezg / logger example snippets
$logger = new \ialopezg\Services\Logger([
'log_path' => 'logs'
]);
/**
* Log a message into the default log system. If the log system does not exists, will create a new one.
*
* @param int $level log message level. Accepts: `debug`, `error`, `info` and `warning` messages.
* @param string $message log message.
*
* @return bool <code>true</code> if line was successfully wrote, <code>false</code> otherwise.
*/
public static function log($level, $message): bool