Skip to content

Commit 69827a2

Browse files
committed
Raise beforeCompletion/afterCompletion exception log level to error
Closes gh-30776 (cherry picked from commit f1567fb)
1 parent ef699b6 commit 69827a2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -85,7 +85,7 @@ public static Mono<Void> triggerBeforeCommit(Collection<TransactionSynchronizati
8585
public static Mono<Void> triggerBeforeCompletion(Collection<TransactionSynchronization> synchronizations) {
8686
return Flux.fromIterable(synchronizations)
8787
.concatMap(TransactionSynchronization::beforeCompletion).onErrorContinue((t, o) ->
88-
logger.debug("TransactionSynchronization.beforeCompletion threw exception", t)).then();
88+
logger.error("TransactionSynchronization.beforeCompletion threw exception", t)).then();
8989
}
9090

9191
/**
@@ -115,7 +115,7 @@ public static Mono<Void> invokeAfterCompletion(
115115
Collection<TransactionSynchronization> synchronizations, int completionStatus) {
116116

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

121121

spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -108,7 +108,7 @@ public static void triggerBeforeCompletion() {
108108
synchronization.beforeCompletion();
109109
}
110110
catch (Throwable ex) {
111-
logger.debug("TransactionSynchronization.beforeCompletion threw exception", ex);
111+
logger.error("TransactionSynchronization.beforeCompletion threw exception", ex);
112112
}
113113
}
114114
}
@@ -172,7 +172,7 @@ public static void invokeAfterCompletion(@Nullable List<TransactionSynchronizati
172172
synchronization.afterCompletion(completionStatus);
173173
}
174174
catch (Throwable ex) {
175-
logger.debug("TransactionSynchronization.afterCompletion threw exception", ex);
175+
logger.error("TransactionSynchronization.afterCompletion threw exception", ex);
176176
}
177177
}
178178
}

0 commit comments

Comments
 (0)