Skip to content

Commit e253225

Browse files
authored
Merge pull request #4 from CakeDC/feature/disable-option
decreased log level when queue monitor is disabled
2 parents fb8de69 + 1dc7b9d commit e253225

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Command/NotifyCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use CakeDC\QueueMonitor\Core\DisableTrait;
2222
use CakeDC\QueueMonitor\Service\QueueMonitoringService;
2323
use Exception;
24+
use Psr\Log\LogLevel;
2425

2526
/**
2627
* QueueMonitoringNotify command.
@@ -64,7 +65,10 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
6465
public function execute(Arguments $args, ConsoleIo $io)
6566
{
6667
if ($this->isDisabled()) {
67-
$this->log('Notification were not sent because Queue Monitor is disabled.');
68+
$this->log(
69+
'Notification were not sent because Queue Monitor is disabled.',
70+
LogLevel::WARNING
71+
);
6872

6973
return self::CODE_SUCCESS;
7074
}

src/Command/PurgeCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
6565
public function execute(Arguments $args, ConsoleIo $io)
6666
{
6767
if ($this->isDisabled()) {
68-
$this->log('Logs were not purged because Queue Monitor is disabled.');
68+
$this->log(
69+
'Logs were not purged because Queue Monitor is disabled.',
70+
LogLevel::WARNING
71+
);
6972

7073
return self::CODE_SUCCESS;
7174
}

0 commit comments

Comments
 (0)