Fix R2dbcTransactionManager debug log: don't log a Mono (#29800)

When logging the current connection inside R2dbcTransactionManager
doBegin, the mono object was logged instead of the connection lambda
parameter.

Other similar debug-level logs do use the actual Connection object,
so this commit does the same.

Backport of gh-29800
Closes gh-29824
This commit is contained in:
Minsoo Cheong(Merlin)
2023-01-16 19:29:43 +09:00
committed by Simon Baslé
parent 4fd5630700
commit 4bd2531774

View File

@@ -193,7 +193,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
Mono<Connection> newCon = Mono.from(obtainConnectionFactory().create());
connectionMono = newCon.doOnNext(connection -> {
if (logger.isDebugEnabled()) {
logger.debug("Acquired Connection [" + newCon + "] for R2DBC transaction");
logger.debug("Acquired Connection [" + connection + "] for R2DBC transaction");
}
txObject.setConnectionHolder(new ConnectionHolder(connection), true);
});