Skip to content
Browse files

Add support for Monolog 1.2.0

  • Loading branch information...
1 parent ee572b3 commit 832f8dd4fe699b0086cc97063b899b8dd69cfa4f @Seldaek Seldaek committed Aug 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
View
6 src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
@@ -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]);
}

0 comments on commit 832f8dd

Please sign in to comment.
Something went wrong with that request. Please try again.