PHP code example of wilkques / log
1. Go to this page and download the library: Download wilkques/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/ */
wilkques / log example snippets
$log = \Wilkques\Log\Log::make();
// or
$log = logger();
$log->logName('<change log name>'); // default system.log
$log->setDirectory('<change log path>'); // default ./storage/logs
$log->info(123);
$log->debug(123);
$log->warning(123);
$log->error(123);
$log->critical(123);
$log->error(new \Exception(123));
$log->critical(new \Exception(456));
// or
Wilkques\Log\Log::info('123');
Wilkques\Log\Log::debug('123');
Wilkques\Log\Log::warning('123');
Wilkques\Log\Log::error('123');
Wilkques\Log\Log::critical('123');
Wilkques\Log\Log::error(new \Exception(123));
Wilkques\Log\Log::critical(new \Exception(456));