fix: Mention exception in log message on failures #497
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.
Brief, plain english overview of your changes here
A small suggestion for some improved ergonomics when reading log output from db-scheduler in the case of failures.
I always find it effective to include a small "summary" of any caught exception in the actual log message. Often this will allow me to pinpoint the error at hand without needing to look into the stacktrace of the logger event. (But this is still possible of course, as before)
Logs when exceptions propagates all the way back to db-scheduler can typically look like this:
This PR will change the log message to mention the actual exception which was caught in the log message:
Fixes
No existing issue, I suspect. Please consider this PR the issue, with a suggested fix, all bundled nicely together :)
Reminders
mvn spotless:apply
cc @kagkarlsson