Browse Source

Raise beforeCompletion/afterCompletion exception log level to error

Closes gh-30776

(cherry picked from commit f1567fb21a)
pull/30971/head
Juergen Hoeller 3 years ago
parent
commit
69827a2f21
  1. 6
      spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java
  2. 6
      spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java

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

@ -1,5 +1,5 @@ @@ -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.
@ -85,7 +85,7 @@ abstract class TransactionSynchronizationUtils { @@ -85,7 +85,7 @@ abstract class TransactionSynchronizationUtils {
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();
}
/**
@ -115,7 +115,7 @@ abstract class TransactionSynchronizationUtils { @@ -115,7 +115,7 @@ abstract class TransactionSynchronizationUtils {
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();
}

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

@ -1,5 +1,5 @@ @@ -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.
@ -108,7 +108,7 @@ public abstract class TransactionSynchronizationUtils { @@ -108,7 +108,7 @@ public abstract class TransactionSynchronizationUtils {
synchronization.beforeCompletion();
}
catch (Throwable ex) {
logger.debug("TransactionSynchronization.beforeCompletion threw exception", ex);
logger.error("TransactionSynchronization.beforeCompletion threw exception", ex);
}
}
}
@ -172,7 +172,7 @@ public abstract class TransactionSynchronizationUtils { @@ -172,7 +172,7 @@ public abstract class TransactionSynchronizationUtils {
synchronization.afterCompletion(completionStatus);
}
catch (Throwable ex) {
logger.debug("TransactionSynchronization.afterCompletion threw exception", ex);
logger.error("TransactionSynchronization.afterCompletion threw exception", ex);
}
}
}

Loading…
Cancel
Save