Remove redundant graph execution exception logging#41
Open
TimurKasatkin wants to merge 1 commit intorelease/1.5from
Open
Remove redundant graph execution exception logging#41TimurKasatkin wants to merge 1 commit intorelease/1.5from
TimurKasatkin wants to merge 1 commit intorelease/1.5from
Conversation
TimurKasatkin
commented
Apr 18, 2021
| """.trimIndent(), | ||
| throwable) | ||
|
|
||
| log.error(exc) {} |
Member
Author
There was a problem hiding this comment.
Such logging has following drawbacks:
- it produces message "kotlin.Unit" since empty message lambda provided
- What is the motivation of such logging if we call
executionResultFuture.completeExceptionally? By doing so library clients loose ability to decide how to handle occurred exception - it is always logged even if graph future still failed with exception. In practice, with this logging error message is duplicated by this logger and client app's logger.
Member
There was a problem hiding this comment.
- There was several cases, when application level logging was incorrectly setup. Presence of logger on completable-reactor level helped resolve issues: it provided detailed stack trace information that app level logging missed.
- By removing this library level logging you making decision on behalf of the the user of application that he should take care of logging in particular way. We removing option: what if number of such errors is small, and user can simply decide do not overwhelm app logic with logging and benefit of the option that completable-reactor itself will provide reasonable diagnostic information if something happens.
- There are another project: bank131 that actively uses reactor. And seems like there are no problems there with this logging. Maybe better option would be to provide dedicated logger name and in user project simply disable particular log via logging option. E.g.
here we can change logger name to ru.fix.completable.reactor.user.exception
And in application we can add option: log4j ru.fix.completable.reactor.user.exception = OFF
swarmshine
requested changes
Apr 19, 2021
| """.trimIndent(), | ||
| throwable) | ||
|
|
||
| log.error(exc) {} |
Member
There was a problem hiding this comment.
- There was several cases, when application level logging was incorrectly setup. Presence of logger on completable-reactor level helped resolve issues: it provided detailed stack trace information that app level logging missed.
- By removing this library level logging you making decision on behalf of the the user of application that he should take care of logging in particular way. We removing option: what if number of such errors is small, and user can simply decide do not overwhelm app logic with logging and benefit of the option that completable-reactor itself will provide reasonable diagnostic information if something happens.
- There are another project: bank131 that actively uses reactor. And seems like there are no problems there with this logging. Maybe better option would be to provide dedicated logger name and in user project simply disable particular log via logging option. E.g.
here we can change logger name to ru.fix.completable.reactor.user.exception
And in application we can add option: log4j ru.fix.completable.reactor.user.exception = OFF
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.