Skip to content

Commit

Permalink
Merge pull request #4 from CakeDC/feature/disable-option
Browse files Browse the repository at this point in the history
decreased log level when queue monitor is disabled
  • Loading branch information
arusinowski authored Oct 21, 2024
2 parents fb8de69 + 1dc7b9d commit e253225
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Command/NotifyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use CakeDC\QueueMonitor\Core\DisableTrait;
use CakeDC\QueueMonitor\Service\QueueMonitoringService;
use Exception;
use Psr\Log\LogLevel;

/**
* QueueMonitoringNotify command.
Expand Down Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion src/Command/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e253225

Please sign in to comment.