1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Add DeduplicationHandler to avoid spamming the same log records over and over

This commit is contained in:
Jordi Boggiano
2016-04-12 17:33:11 +01:00
parent a7ade9d68f
commit 1fa91efc3b
3 changed files with 340 additions and 0 deletions

View File

@@ -73,6 +73,12 @@ class TestHandler extends AbstractProcessingHandler
return $this->records;
}
public function clear()
{
$this->records = array();
$this->recordsByLevel = array();
}
protected function hasRecordRecords($level)
{
return isset($this->recordsByLevel[$level]);