marcoazn89/monolog-ignore-strategy

There is no license information available for the latest version (v1.0) of this package.

v1.0 2016-03-15 23:08 UTC

This package is not auto-updated.

Last update: 2024-04-24 23:05:07 UTC


README

A monolog activation strategy that ignores log levels within a range

$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])
));