Add support for Monolog 1.2.0
This commit is contained in:
parent
ee572b34cf
commit
832f8dd4fe
@ -47,7 +47,11 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface
|
||||
public function countErrors()
|
||||
{
|
||||
$cnt = 0;
|
||||
foreach (array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT) as $level) {
|
||||
$levels = array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT);
|
||||
if (defined('Monolog\Logger::EMERGENCY')) {
|
||||
$levels[] = Logger::EMERGENCY;
|
||||
}
|
||||
foreach ($levels as $level) {
|
||||
if (isset($this->recordsByLevel[$level])) {
|
||||
$cnt += count($this->recordsByLevel[$level]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user