|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
namespace Symfony\Bundle\MonologBundle\Logger;
|
|
namespace Symfony\Bundle\MonologBundle\Logger;
|
|
|
|
|
|
-use Monolog\Logger;
|
|
|
|
|
|
+use Monolog\Logger as MonologLogger;
|
|
use Monolog\Handler\TestHandler;
|
|
use Monolog\Handler\TestHandler;
|
|
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
|
|
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
|
|
|
|
|
|
@@ -36,6 +36,7 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface
|
|
'priorityName' => $record['level_name'],
|
|
'priorityName' => $record['level_name'],
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
+
|
|
return $records;
|
|
return $records;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -45,11 +46,12 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface
|
|
public function countErrors()
|
|
public function countErrors()
|
|
{
|
|
{
|
|
$cnt = 0;
|
|
$cnt = 0;
|
|
- foreach (array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT) as $level) {
|
|
|
|
|
|
+ foreach (array(MonologLogger::ERROR, MonologLogger::CRITICAL, MonologLogger::ALERT) as $level) {
|
|
if (isset($this->recordsByLevel[$level])) {
|
|
if (isset($this->recordsByLevel[$level])) {
|
|
- $cnt += count($this->recordsByLevel[$level])
|
|
|
|
|
|
+ $cnt += count($this->recordsByLevel[$level]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
return $cnt;
|
|
return $cnt;
|
|
}
|
|
}
|
|
}
|
|
}
|