minor #30764 [Messenger] Changing message handling log levels to higher 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
-------

9153c48bc4 Changing message handling log levels to higher levels
This commit is contained in:
Samuel ROZE 2019-03-29 21:53:56 +07:00
commit 37b616fefb

View File

@ -99,7 +99,7 @@ class Worker
$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
@ -113,7 +113,7 @@ class Worker
$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);