Skip to content

Commit

Permalink
Merge pull request #59 from agorapulse/chore/log-errors-from-jobs
Browse files Browse the repository at this point in the history
log errors from jobs
  • Loading branch information
musketyr authored Feb 21, 2025
2 parents 9e494f1 + 9c9f2a3 commit f44ecd8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ void onJobExecutionResult(JobExecutionResultEvent event) {

@EventListener
void onJobExecutionFinished(JobExecutionFinishedEvent event) {
if (LOGGER.isErrorEnabled() && event.getStatus().getException() != null) {
LOGGER.error("Failed to execute job {}#{}", event.getName(), event.getStatus().getId(), event.getStatus().getException());

}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Finished executing job {}#{} in {}", event.getName(), event.getStatus().getId(), event.getStatus().getHumanReadableDuration());
}
Expand Down

0 comments on commit f44ecd8

Please sign in to comment.