You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Mention exception in log message on failures (#497)
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:
<img width="973" alt="db-scheduler-failure-log"
src="https://github.com/kagkarlsson/db-scheduler/assets/174823/cec1f574-1b76-4443-84bc-92af519bcc80">
This PR will change the log message to mention the actual exception
which was caught in the log message:
> Unhandled exception IllegalArgumentException: 'Illegal character in
path at index 9: [replace with URL]' during execution of task with name
'my-task-name'. Treating as failure.
## Fixes
No existing issue, I suspect. Please consider this PR the issue, with a
suggested fix, all bundled nicely together :)
## Reminders
- [x] Added/ran automated tests (existing tests have been run)
- [x] Update README and/or examples (no update necessary, I think)
- [x] Ran `mvn spotless:apply`
---
cc @kagkarlsson
0 commit comments