Skip to content

Commit a7a67e4

Browse files
committed
HHH-19288 Move log of connection details to a method
For Hibernate Reactive, it needs to be able to disable, or customize, the log of the connection details.
1 parent 371658a commit a7a67e4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/JdbcEnvironmentInitiator.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,14 @@ else if ( explicitDialectConfiguration( explicitDatabaseName, configurationValue
153153
databaseConnectionInfo = buildDbInfo( configurationValues, jdbcEnvironment.getDialect() );
154154
}
155155

156+
logConnectionInfo( databaseConnectionInfo );
157+
return jdbcEnvironment;
158+
}
159+
160+
// For Hibernate Reactive: it needs to disable or customize the log
161+
protected void logConnectionInfo(DatabaseConnectionInfo databaseConnectionInfo) {
156162
// Standardized DB info logging
157163
ConnectionInfoLogger.INSTANCE.logConnectionInfoDetails( databaseConnectionInfo.toInfoString() );
158-
159-
return jdbcEnvironment;
160164
}
161165

162166
private DatabaseConnectionInfo buildDbInfo(ServiceRegistryImplementor registry, Dialect dialect) {

0 commit comments

Comments
 (0)