Skip to content

Commit

Permalink
Add support for Monolog 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Aug 18, 2012
1 parent ee572b3 commit 832f8dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
Expand Up @@ -47,7 +47,11 @@ public function getLogs()
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]);
}
Expand Down

0 comments on commit 832f8dd

Please sign in to comment.