mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Added support of ALERT and CRITICAL in TestHandler
This commit is contained in:
@@ -30,6 +30,16 @@ class TestHandler extends AbstractHandler
|
|||||||
return $this->records;
|
return $this->records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasAlert($record)
|
||||||
|
{
|
||||||
|
return $this->hasRecord($record, Logger::ALERT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasCritical($record)
|
||||||
|
{
|
||||||
|
return $this->hasRecord($record, Logger::CRITICAL);
|
||||||
|
}
|
||||||
|
|
||||||
public function hasError($record)
|
public function hasError($record)
|
||||||
{
|
{
|
||||||
return $this->hasRecord($record, Logger::ERROR);
|
return $this->hasRecord($record, Logger::ERROR);
|
||||||
@@ -50,6 +60,16 @@ class TestHandler extends AbstractHandler
|
|||||||
return $this->hasRecord($record, Logger::DEBUG);
|
return $this->hasRecord($record, Logger::DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasAlertRecords()
|
||||||
|
{
|
||||||
|
return isset($this->recordsByLevel[Logger::ALERT]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasCriticalRecords()
|
||||||
|
{
|
||||||
|
return isset($this->recordsByLevel[Logger::CRITICAL]);
|
||||||
|
}
|
||||||
|
|
||||||
public function hasErrorRecords()
|
public function hasErrorRecords()
|
||||||
{
|
{
|
||||||
return isset($this->recordsByLevel[Logger::ERROR]);
|
return isset($this->recordsByLevel[Logger::ERROR]);
|
||||||
|
Reference in New Issue
Block a user