HHH-18538 fix startup logging for DatasourceConnectionProviderImpl and multi-tenant version
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
8aa37a9d85
commit
47c99d5a31
|
@ -139,13 +139,20 @@ public class DatasourceConnectionProviderImpl implements ConnectionProvider, Con
|
|||
@Override
|
||||
public DatabaseConnectionInfo getDatabaseConnectionInfo(Dialect dialect) {
|
||||
return new DatabaseConnectionInfoImpl(
|
||||
"Connecting through datasource '" + (dataSourceJndiName != null ? dataSourceJndiName : dataSource) + "'",
|
||||
null,
|
||||
null,
|
||||
dialect.getVersion(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
) {
|
||||
@Override
|
||||
public String toInfoString() {
|
||||
return dataSourceJndiName != null
|
||||
? "\tDatasource JND name [" + dataSourceJndiName + "]"
|
||||
: "\tProvided DataSource";
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,14 +125,19 @@ public class DataSourceBasedMultiTenantConnectionProviderImpl<T>
|
|||
@Override
|
||||
public DatabaseConnectionInfo getDatabaseConnectionInfo(Dialect dialect) {
|
||||
return new DatabaseConnectionInfoImpl(
|
||||
"Multi-tenant - " + tenantIdentifierForAny,
|
||||
null,
|
||||
null,
|
||||
dialect.getVersion(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
) {
|
||||
@Override
|
||||
public String toInfoString() {
|
||||
return "\tMulti-tenant datasource JNDI name [" + jndiName + ']';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue