This repository was archived by the owner on Dec 1, 2025. It is now read-only.
Allow customising task error logging#226
Merged
dmytro-bekuzarov merged 1 commit intomasterfrom Apr 29, 2025
Merged
Conversation
normanma-tw
reviewed
Apr 17, 2025
| * @param task task | ||
| * @param t thrown exception | ||
| * @param retryTime next retry time, {@code null} if no next retry | ||
| * @return {@code true} if the exception should be logged, {@code false} otherwise |
Contributor
There was a problem hiding this comment.
I find how this API combines "should log an exception" return type and "do the logging of an exception if you override it" rather confusing, since if an implementer decided to override this to log at INFO this line would no longer be accurate. IMO It would be better to separate the two.
4579595 to
1c5e7cf
Compare
1c5e7cf to
a76a04f
Compare
normanma-tw
approved these changes
Apr 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
By default, we log processing exceptions with ERROR logging level.
If you do not want to log a specific error, or if you want to log it yourself (for example, you want to log with INFO level instead or on last retry only), you can now override the behaviour using
ITaskRetryPolicy#logExceptionmethod.Checklist