Skip to content

Commit cc1a73a

Browse files
committed
ICL: Deduplication logic added.
1 parent d05d749 commit cc1a73a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Loggable.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract;
66
use Illuminated\Console\Log\Formatter;
77
use Illuminated\Console\Log\HtmlFormatter;
8+
use Monolog\Handler\DeduplicationHandler;
89
use Monolog\Handler\MandrillHandler;
910
use Monolog\Handler\NativeMailerHandler;
1011
use Monolog\Handler\RotatingFileHandler;
@@ -66,6 +67,9 @@ private function getLogHandlers()
6667

6768
$mailerHandler = $this->getMailerHandler();
6869
if (!empty($mailerHandler)) {
70+
if ($this->getNotificationDeduplication()) {
71+
$mailerHandler = new DeduplicationHandler($mailerHandler, null, $this->getNotificationLevel());
72+
}
6973
$handlers[] = $mailerHandler;
7074
}
7175

@@ -200,6 +204,11 @@ protected function getNotificationLevel()
200204
return Logger::NOTICE;
201205
}
202206

207+
protected function getNotificationDeduplication()
208+
{
209+
return false;
210+
}
211+
203212
protected function icLogger()
204213
{
205214
return $this->icLogger;

0 commit comments

Comments
 (0)