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.
This commit is contained in:
Minsoo Cheong(Merlin) 2023-01-16 19:29:43 +09:00 committed by GitHub
parent 5de1460f88
commit c0e38a2f1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,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);
});