From 5be9ab7a1045cf5b88e1e3d822a62312ce5dc622 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Fri, 24 Sep 2021 11:05:01 +0200 Subject: [PATCH] [Messenger] Document new log severity marker interface See https://github.com/symfony/messenger/pull/16 --- messenger.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/messenger.rst b/messenger.rst index cbf9ad52255..3b5bb07df78 100644 --- a/messenger.rst +++ b/messenger.rst @@ -807,6 +807,23 @@ and must be retried. If you throw :class:`Symfony\\Component\\Messenger\\Exception\\RecoverableMessageHandlingException`, the message will always be retried infinitely and ``max_retries`` setting will be ignored. +Retry logging +~~~~~~~~~~~~~ + +.. versionadded:: 5.4 + + The ``LogRetryAsWarningInterface`` was introduced in Symfony 5.4. + +When a message is sent for retry, a log message is logged indicating how many times the +message was retried along with the number of milliseconds of the delay. By default, retry +log messages have log severity `ERROR` except the final failed retry which is logged as +`CRITICAL`. + +Exceptions implementing the +:class:`Symfony\\Component\\Messenger\\Exception\\LogRetryAsWarningInterface` are logged +in a similar fashion: each failed message handling attempt is logged as a warning and +the final failed attempt is logged as `CRITICAL`. + .. _messenger-failure-transport: Saving & Retrying Failed Messages