Skip to content

Commit

Permalink
minor #30764 [Messenger] Changing message handling log levels to high…
Browse files Browse the repository at this point in the history
…er levels (weaverryan)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Changing message handling log levels to higher levels

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | not needed

Update log levels so that the user can configure the logger to be notified of errors. This was really an oversight when I originally added the logging.

Cheers!

Commits
-------

9153c48 Changing message handling log levels to higher levels
  • Loading branch information
sroze committed Mar 29, 2019
2 parents 162d5a8 + 9153c48 commit 37b616f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Messenger/Worker.php
Expand Up @@ -99,7 +99,7 @@ public function run()

$retryCount = $this->getRetryCount($envelope) + 1;
if (null !== $this->logger) {
$this->logger->info('Retrying {class} - retry #{retryCount}.', $context + ['retryCount' => $retryCount, 'error' => $throwable]);
$this->logger->error('Retrying {class} - retry #{retryCount}.', $context + ['retryCount' => $retryCount, 'error' => $throwable]);
}

// add the delay and retry stamp info + remove ReceivedStamp
Expand All @@ -113,7 +113,7 @@ public function run()
$this->receiver->ack($envelope);
} else {
if (null !== $this->logger) {
$this->logger->info('Rejecting {class} (removing from transport).', $context + ['error' => $throwable]);
$this->logger->critical('Rejecting {class} (removing from transport).', $context + ['error' => $throwable]);
}

$this->receiver->reject($envelope);
Expand Down

0 comments on commit 37b616f

Please sign in to comment.