From 1dc7b9d9b04d12891b7d7d9054ba63689879da7a Mon Sep 17 00:00:00 2001 From: Adam Rusinowski Date: Mon, 21 Oct 2024 20:08:28 +0200 Subject: [PATCH] decreased log level when queue monitor is disabled --- src/Command/NotifyCommand.php | 6 +++++- src/Command/PurgeCommand.php | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Command/NotifyCommand.php b/src/Command/NotifyCommand.php index 3c3f892..6ec4f17 100644 --- a/src/Command/NotifyCommand.php +++ b/src/Command/NotifyCommand.php @@ -21,6 +21,7 @@ use CakeDC\QueueMonitor\Core\DisableTrait; use CakeDC\QueueMonitor\Service\QueueMonitoringService; use Exception; +use Psr\Log\LogLevel; /** * QueueMonitoringNotify command. @@ -64,7 +65,10 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar public function execute(Arguments $args, ConsoleIo $io) { if ($this->isDisabled()) { - $this->log('Notification were not sent because Queue Monitor is disabled.'); + $this->log( + 'Notification were not sent because Queue Monitor is disabled.', + LogLevel::WARNING + ); return self::CODE_SUCCESS; } diff --git a/src/Command/PurgeCommand.php b/src/Command/PurgeCommand.php index 6550d29..7156410 100644 --- a/src/Command/PurgeCommand.php +++ b/src/Command/PurgeCommand.php @@ -65,7 +65,10 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar public function execute(Arguments $args, ConsoleIo $io) { if ($this->isDisabled()) { - $this->log('Logs were not purged because Queue Monitor is disabled.'); + $this->log( + 'Logs were not purged because Queue Monitor is disabled.', + LogLevel::WARNING + ); return self::CODE_SUCCESS; }