Skip to content

Commit

Permalink
Raise beforeCompletion/afterCompletion exception log level to error
Browse files Browse the repository at this point in the history
Closes gh-30776

(cherry picked from commit f1567fb)
  • Loading branch information
jhoeller committed Jun 30, 2023
1 parent ef699b6 commit 69827a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,7 +85,7 @@ public static Mono<Void> triggerBeforeCommit(Collection<TransactionSynchronizati
public static Mono<Void> triggerBeforeCompletion(Collection<TransactionSynchronization> synchronizations) {
return Flux.fromIterable(synchronizations)
.concatMap(TransactionSynchronization::beforeCompletion).onErrorContinue((t, o) ->
logger.debug("TransactionSynchronization.beforeCompletion threw exception", t)).then();
logger.error("TransactionSynchronization.beforeCompletion threw exception", t)).then();
}

/**
Expand Down Expand Up @@ -115,7 +115,7 @@ public static Mono<Void> invokeAfterCompletion(
Collection<TransactionSynchronization> synchronizations, int completionStatus) {

return Flux.fromIterable(synchronizations).concatMap(it -> it.afterCompletion(completionStatus))
.onErrorContinue((t, o) -> logger.debug("TransactionSynchronization.afterCompletion threw exception", t)).then();
.onErrorContinue((t, o) -> logger.error("TransactionSynchronization.afterCompletion threw exception", t)).then();
}


Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,7 +108,7 @@ public static void triggerBeforeCompletion() {
synchronization.beforeCompletion();
}
catch (Throwable ex) {
logger.debug("TransactionSynchronization.beforeCompletion threw exception", ex);
logger.error("TransactionSynchronization.beforeCompletion threw exception", ex);
}
}
}
Expand Down Expand Up @@ -172,7 +172,7 @@ public static void invokeAfterCompletion(@Nullable List<TransactionSynchronizati
synchronization.afterCompletion(completionStatus);
}
catch (Throwable ex) {
logger.debug("TransactionSynchronization.afterCompletion threw exception", ex);
logger.error("TransactionSynchronization.afterCompletion threw exception", ex);
}
}
}
Expand Down

0 comments on commit 69827a2

Please sign in to comment.