PHP code example of marcoazn89 / monolog-ignore-strategy
1. Go to this page and download the library: Download marcoazn89/monolog-ignore-strategy 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/ */
marcoazn89 / monolog-ignore-strategy example snippets
$logger = new \Monolog\Logger('Test');
$handler = new \Monolog\Handler\StreamHandler(
'my.log',
100
);
// Trigger logging from DEBUG or higuer but not ALERT
$logger->pushHandler(new \Monolog\Handler\FingersCrossedHandler(
$handler,
new Marcoazn89\IgnoreStrategy(\Monolog\Logger::DEBUG, [\Monolog\Logger::ERROR, \Monolog\Logger::ALERT])
));