Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lower log level in case of retry#43492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromjderusse:lower-level
Oct 15, 2021
Merged

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedOct 14, 2021
edited
Loading

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

When a message is retried, we currently log the failure with aERROR level (or with a WARNING level in case of RecoverableExceptionInterface).

If the application has set up a retry mechanism, it means failure is expected and is part of the flow. Sending alert for something that will be retried is noise.

This PR reduces the verbosity of retried messages.

Should it be a bug for 4.4 🤔 ?

franek, nitneuk, and nikophil reacted with thumbs up emoji
@carsonbot
Copy link

Hey!

I think@nikophil has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Contributor

@nikophilnikophil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Don't know why I have been pinged on that, but that's definitely a +1 for me - we're actually thinking this is making to much noise in the logs

@fabpot
Copy link
Member

Behavior change == new feature :)

@fabpot
Copy link
Member

Thank you@jderusse.

@fabpotfabpot merged commit9044f7f intosymfony:5.4Oct 15, 2021
This was referencedNov 5, 2021
jorissteyn pushed a commit to jorissteyn/symfony that referenced this pull requestNov 17, 2021
This commit adds a new interface method on the `RetryStrategyInterface`allowing custom retry strategies to control the log severity of failedand retried messages.This is a spin-off fromsymfony#43160| Q             | A| ------------- | ---| Branch?       | 6.0| Bug fix?      | no| BC break? | yes - custom retry strategies require including the new trait or implementing the new method| New feature?  | yes - changelog not yet updated| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | not yet, collecting feedback firstThe default logic for determining the log severity for failed messageshas been (sincesymfony#43492): - recoverable exceptions are logged as warning - unrecoverable exceptions are logged as critical - neutral exceptions are logged as warning after a non-final attempt - neutral exceptions are logged as critical after a final attemptThis PR implements the exact same behaviour but in a way that allowsusers to augment or override the default behaviour with their ownspecific needs. For example, having specific exceptions logged as`EMERGENCY` or to log them as `NOTICE` until or including the lastattempt.The refactoring done to make this possible is: - move the logic determining if an exception is   recoverable/unrecoverable/neutral to the `HandlerFailedException`   so it can be used by retry strategy objects - add a new interface method on the `RetryStrategyInterface` (BC   break!) - implement the existing behaviour using the new mechanism in a   trait, this way, custom retry strategies can easily re-use the   default behaviour
jorissteyn pushed a commit to jorissteyn/symfony that referenced this pull requestNov 17, 2021
This commit adds a new interface method on the `RetryStrategyInterface`allowing custom retry strategies to control the log severity of failedand retried messages.This is a spin-off fromsymfony#43160| Q             | A| ------------- | ---| Branch?       | 6.0| Bug fix?      | no| BC break? | yes - custom retry strategies require including the new trait or implementing the new method| New feature?  | yes - changelog not yet updated| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | not yet, collecting feedback firstThe default logic for determining the log severity for failed messageshas been (sincesymfony#43492): - recoverable exceptions are logged as warning - unrecoverable exceptions are logged as critical - neutral exceptions are logged as warning after a non-final attempt - neutral exceptions are logged as critical after a final attemptThis PR implements the exact same behaviour but in a way that allowsusers to augment or override the default behaviour with their ownspecific needs. For example, having specific exceptions logged as`EMERGENCY` or to log them as `NOTICE` until or including the lastattempt.The refactoring done to make this possible is: - move the logic determining if an exception is   recoverable/unrecoverable/neutral to the `HandlerFailedException`   so it can be used by retry strategy objects - add a new interface method on the `RetryStrategyInterface` (BC   break!) - implement the existing behaviour using the new mechanism in a   trait, this way, custom retry strategies can easily re-use the   default behaviour
jorissteyn pushed a commit to jorissteyn/symfony that referenced this pull requestNov 18, 2021
This commit adds a new interface method on the `RetryStrategyInterface`allowing custom retry strategies to control the log severity of failedand retried messages.This is a spin-off fromsymfony#43160| Q             | A| ------------- | ---| Branch?       | 6.0| Bug fix?      | no| BC break? | yes - custom retry strategies require including the new trait or implementing the new method| New feature?  | yes - changelog not yet updated| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | not yet, collecting feedback firstThe default logic for determining the log severity for failed messageshas been (sincesymfony#43492): - recoverable exceptions are logged as warning - unrecoverable exceptions are logged as critical - neutral exceptions are logged as warning after a non-final attempt - neutral exceptions are logged as critical after a final attemptThis PR implements the exact same behaviour but in a way that allowsusers to augment or override the default behaviour with their ownspecific needs. For example, having specific exceptions logged as`EMERGENCY` or to log them as `NOTICE` until or including the lastattempt.The refactoring done to make this possible is: - move the logic determining if an exception is   recoverable/unrecoverable/neutral to the `HandlerFailedException`   so it can be used by retry strategy objects - add a new interface method on the `RetryStrategyInterface` (BC   break!) - implement the existing behaviour using the new mechanism in a   trait, this way, custom retry strategies can easily re-use the   default behaviour
jorissteyn pushed a commit to jorissteyn/symfony that referenced this pull requestNov 18, 2021
This commit adds a new interface method on the `RetryStrategyInterface`allowing custom retry strategies to control the log severity of failedand retried messages.This is a spin-off fromsymfony#43160| Q             | A| ------------- | ---| Branch?       | 6.0| Bug fix?      | no| BC break? | yes - custom retry strategies require including the new trait or implementing the new method| New feature?  | yes - changelog not yet updated| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | not yet, collecting feedback firstThe default logic for determining the log severity for failed messageshas been (sincesymfony#43492): - recoverable exceptions are logged as warning - unrecoverable exceptions are logged as critical - neutral exceptions are logged as warning after a non-final attempt - neutral exceptions are logged as critical after a final attemptThis PR implements the exact same behaviour but in a way that allowsusers to augment or override the default behaviour with their ownspecific needs. For example, having specific exceptions logged as`EMERGENCY` or to log them as `NOTICE` until or including the lastattempt.The refactoring done to make this possible is: - move the logic determining if an exception is   recoverable/unrecoverable/neutral to the `HandlerFailedException`   so it can be used by retry strategy objects - add a new interface method on the `RetryStrategyInterface` (BC   break!) - implement the existing behaviour using the new mechanism in a   trait, this way, custom retry strategies can easily re-use the   default behaviour
jorissteyn pushed a commit to jorissteyn/symfony that referenced this pull requestNov 18, 2021
This commit adds a new interface method on the `RetryStrategyInterface`allowing custom retry strategies to control the log severity of failedand retried messages.This is a spin-off fromsymfony#43160| Q             | A| ------------- | ---| Branch?       | 6.0| Bug fix?      | no| BC break? | yes - custom retry strategies require including the new trait or implementing the new method| New feature?  | yes - changelog not yet updated| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | not yet, collecting feedback firstThe default logic for determining the log severity for failed messageshas been (sincesymfony#43492): - recoverable exceptions are logged as warning - unrecoverable exceptions are logged as critical - neutral exceptions are logged as warning after a non-final attempt - neutral exceptions are logged as critical after a final attemptThis PR implements the exact same behaviour but in a way that allowsusers to augment or override the default behaviour with their ownspecific needs. For example, having specific exceptions logged as`EMERGENCY` or to log them as `NOTICE` until or including the lastattempt.The refactoring done to make this possible is: - move the logic determining if an exception is   recoverable/unrecoverable/neutral to the `HandlerFailedException`   so it can be used by retry strategy objects - add a new interface method on the `RetryStrategyInterface` (BC   break!) - implement the existing behaviour using the new mechanism in a   trait, this way, custom retry strategies can easily re-use the   default behaviour
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@srozesrozeAwaiting requested review from sroze

+1 more reviewer

@nikophilnikophilnikophil approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@jderusse@carsonbot@fabpot@nikophil

[8]ページ先頭

©2009-2025 Movatter.jp