HHH-13211 Reduce logging verbosity of QueryTranslatorFactoryInitiator

This commit is contained in:
Sanne Grinovero 2019-01-17 17:33:58 +00:00 committed by Guillaume Smet
parent 9c63819000
commit 15ea965d20
2 changed files with 2 additions and 10 deletions

View File

@ -13,7 +13,6 @@ import org.hibernate.boot.registry.selector.spi.StrategySelector;
import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory; import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory;
import org.hibernate.hql.spi.QueryTranslatorFactory; import org.hibernate.hql.spi.QueryTranslatorFactory;
import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.service.spi.ServiceRegistryImplementor; import org.hibernate.service.spi.ServiceRegistryImplementor;
import static org.hibernate.cfg.AvailableSettings.QUERY_TRANSLATOR; import static org.hibernate.cfg.AvailableSettings.QUERY_TRANSLATOR;
@ -24,7 +23,6 @@ import static org.hibernate.cfg.AvailableSettings.QUERY_TRANSLATOR;
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public class QueryTranslatorFactoryInitiator implements StandardServiceInitiator<QueryTranslatorFactory> { public class QueryTranslatorFactoryInitiator implements StandardServiceInitiator<QueryTranslatorFactory> {
private static final CoreMessageLogger log = CoreLogging.messageLogger( QueryTranslatorFactoryInitiator.class );
/** /**
* Singleton access * Singleton access
@ -42,10 +40,8 @@ public class QueryTranslatorFactoryInitiator implements StandardServiceInitiator
ASTQueryTranslatorFactory.INSTANCE ASTQueryTranslatorFactory.INSTANCE
); );
log.debugf( "QueryTranslatorFactory : %s", factory ); CoreLogging.messageLogger( QueryTranslatorFactoryInitiator.class )
if ( factory instanceof ASTQueryTranslatorFactory ) { .debug( "QueryTranslatorFactory: " + factory );
log.usingAstQueryTranslatorFactory();
}
return factory; return factory;
} }

View File

@ -1401,10 +1401,6 @@ public interface CoreMessageLogger extends BasicLogger {
@Message(value = "Updating schema", id = 396) @Message(value = "Updating schema", id = 396)
void updatingSchema(); void updatingSchema();
@LogMessage(level = INFO)
@Message(value = "Using ASTQueryTranslatorFactory", id = 397)
void usingAstQueryTranslatorFactory();
@LogMessage(level = INFO) @LogMessage(level = INFO)
@Message(value = "Explicit segment value for id generator [%s.%s] suggested; using default [%s]", id = 398) @Message(value = "Explicit segment value for id generator [%s.%s] suggested; using default [%s]", id = 398)
void usingDefaultIdGeneratorSegmentValue( void usingDefaultIdGeneratorSegmentValue(