1. Go to this page and download the library: Download v-dem/queasy-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/ */
v-dem / queasy-log example snippets
return [
'logger' => [
'class' => queasy\log\FileSystemLogger::class, // Logger class
'processName' => 'test', // Process name, to differentiate log messages from different sources
'minLevel' => Psr\Log\LogLevel::WARNING, // Message's minimum acceptable log level
'path' => 'debug.log' // Path to logger output file
]
];
$config = new queasy\config\Config('config.php');
$config =
$logger = new queasy\log\Logger($config);
$logger = queasy\log\Logger::create($config);
$logger->warning('Test warning message.');
$logger
->warning('going strange')
->error('cannot connect to the database')
->emergency('the website is down');