mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-13 14:44:48 +00:00
HHH-16831 Replace string concat with proper string format for logging
This commit is contained in:
parent
038bbe3b28
commit
3aafade866
@ -3146,17 +3146,17 @@ public void doSecondPass(Map<String, PersistentClass> persistentClasses) throws
|
|||||||
collectionBinding.createAllKeys();
|
collectionBinding.createAllKeys();
|
||||||
|
|
||||||
if ( log.isDebugEnabled() ) {
|
if ( log.isDebugEnabled() ) {
|
||||||
log.debugf( "Mapped collection : " + getPluralAttributeSource().getAttributeRole().getFullPath() );
|
log.debugf( "Mapped collection : %s", getPluralAttributeSource().getAttributeRole().getFullPath() );
|
||||||
log.debugf( " + table -> " + getCollectionBinding().getTable().getName() );
|
log.debugf( " + table -> %s", getCollectionBinding().getTable().getName() );
|
||||||
log.debugf( " + key -> " + columns( getCollectionBinding().getKey() ) );
|
log.debugf( " + key -> %s", columns( getCollectionBinding().getKey() ) );
|
||||||
if ( getCollectionBinding().isIndexed() ) {
|
if ( getCollectionBinding().isIndexed() ) {
|
||||||
log.debugf( " + index -> " + columns( ( (IndexedCollection) getCollectionBinding() ).getIndex() ) );
|
log.debugf( " + index -> %s", columns( ( (IndexedCollection) getCollectionBinding() ).getIndex() ) );
|
||||||
}
|
}
|
||||||
if ( getCollectionBinding().isOneToMany() ) {
|
if ( getCollectionBinding().isOneToMany() ) {
|
||||||
log.debugf( " + one-to-many -> " + ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName() );
|
log.debugf( " + one-to-many -> %s", ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName() );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log.debugf( " + element -> " + columns( getCollectionBinding().getElement() ) );
|
log.debugf( " + element -> %s", columns( getCollectionBinding().getElement() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public StandardHqlTranslator(
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <R> SqmStatement<R> translate(String query, Class<R> expectedResultType) {
|
public <R> SqmStatement<R> translate(String query, Class<R> expectedResultType) {
|
||||||
HqlLogging.QUERY_LOGGER.debugf( "HQL : " + query );
|
HqlLogging.QUERY_LOGGER.debugf( "HQL : %s", query );
|
||||||
|
|
||||||
final HqlParser.StatementContext hqlParseTree = parseHql( query );
|
final HqlParser.StatementContext hqlParseTree = parseHql( query );
|
||||||
|
|
||||||
|
@ -1019,7 +1019,7 @@ else if ( assignmentValue instanceof SqmLiteralNull<?> ) {
|
|||||||
.getJdbcTypeCount();
|
.getJdbcTypeCount();
|
||||||
|
|
||||||
if ( valueExprJdbcCount != assignedPathJdbcCount ) {
|
if ( valueExprJdbcCount != assignedPathJdbcCount ) {
|
||||||
SqlTreeCreationLogger.LOGGER.debugf(
|
SqlTreeCreationLogger.LOGGER.debug(
|
||||||
"JDBC type count does not match in UPDATE assignment between the assigned-path and the assigned-value; " +
|
"JDBC type count does not match in UPDATE assignment between the assigned-path and the assigned-value; " +
|
||||||
"this will likely lead to problems executing the query"
|
"this will likely lead to problems executing the query"
|
||||||
);
|
);
|
||||||
@ -3340,7 +3340,7 @@ private TableGroup consumeAttributeJoin(
|
|||||||
// add any additional join restrictions
|
// add any additional join restrictions
|
||||||
if ( sqmJoin.getJoinPredicate() != null ) {
|
if ( sqmJoin.getJoinPredicate() != null ) {
|
||||||
if ( sqmJoin.isFetched() ) {
|
if ( sqmJoin.isFetched() ) {
|
||||||
QueryLogging.QUERY_MESSAGE_LOGGER.debugf( "Join fetch [" + sqmJoinNavigablePath + "] is restricted" );
|
QueryLogging.QUERY_MESSAGE_LOGGER.debugf( "Join fetch [%s] is restricted", sqmJoinNavigablePath );
|
||||||
}
|
}
|
||||||
|
|
||||||
final SqmJoin<?, ?> oldJoin = currentlyProcessingJoin;
|
final SqmJoin<?, ?> oldJoin = currentlyProcessingJoin;
|
||||||
|
@ -34,7 +34,7 @@ public class CdiBeanContainerExtendedAccessImpl
|
|||||||
|
|
||||||
private CdiBeanContainerExtendedAccessImpl(ExtendedBeanManager beanManager) {
|
private CdiBeanContainerExtendedAccessImpl(ExtendedBeanManager beanManager) {
|
||||||
beanManager.registerLifecycleListener( this );
|
beanManager.registerLifecycleListener( this );
|
||||||
log.debugf( "Extended access requested to CDI BeanManager : " + beanManager );
|
log.debugf( "Extended access requested to CDI BeanManager : %s", beanManager );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,7 +43,7 @@ public static void logSqlAst(Statement sqlAstStatement) {
|
|||||||
final SqlTreePrinter printer = new SqlTreePrinter();
|
final SqlTreePrinter printer = new SqlTreePrinter();
|
||||||
printer.visitStatement( sqlAstStatement );
|
printer.visitStatement( sqlAstStatement );
|
||||||
|
|
||||||
SqlAstTreeLogger.INSTANCE.debugf( "SQL AST Tree:%n" + printer.buffer.toString() );
|
SqlAstTreeLogger.INSTANCE.debugf( "SQL AST Tree:%n%s", printer.buffer );
|
||||||
}
|
}
|
||||||
|
|
||||||
private final StringBuffer buffer = new StringBuffer();
|
private final StringBuffer buffer = new StringBuffer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user