PHP code example of czproject / logger
1. Go to this page and download the library: Download czproject/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/ */
czproject / logger example snippets
$logger = new Logger\OutputLogger(ILogger::DEBUG); // minimal level
$proxy = new Logger\LoggerProxy($logger);
$proxy->debug('Debug info');
$proxy->log('Output'); // or $proxy->info()
$proxy->success('Done!');
$proxy->warning('Warning...', ILogger::WARNING);
$proxy->error('Error message', ILogger::ERROR);
$proxy->exception('Exception message', ILogger::EXCEPTION);
$proxy->critical('App crashed.', ILogger::CRITICAL);