1. Go to this page and download the library: Download evolutionphp/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/ */
evolutionphp / logger example snippets
$config['path'] = __DIR__.'/logs/';
$config['ext'] = 'php';
$config['file_permissions'] = 0644;
$config['level'] = 1;
//OR Debug Messages and Informational Messages, without Error Messages
$config['level'] = array(2,3);
$config['date_format'] = 'Y-m-d H:i:s';
$logger = new \EvolutionPHP\Logger\Log($config);
//Write logs
$logger->write_log('error','This is an error message.');
$logger->write_log('debug','This is a debug message.');
$logger->write_log('info','This is an info message.');
function log_message($level, $message){
$logger = \EvolutionPHP\Logger\Log::instance();
$logger->write_log($level, $message);
}
log_mesage('error','This is a second error.');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.