PHP code example of galvao-eti / monolog-wrapper
1. Go to this page and download the library: Download galvao-eti/monolog-wrapper 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/ */
galvao-eti / monolog-wrapper example snippets
use GalvaoEti\MonologWrapper;
// If you wish to add streams and/or processors just add them to the static attributes:
MonologWrapper::$streams['streamName'] = 'streamSeverity';
MonologWrapper::$processors[] = new \Monolog\Processor\WebProcessor(null, [
'ip' => 'REMOTE_ADDR',
'referrer' => 'HTTP_REFERER',
'method' => 'REQUEST_METHOD',
]);
$logger = MonologWrapper::getInstance();
// From here onwards just use Moolog's own methods, such as debug(), info(), etc...