HHH-12591 Reverting the changes to the logging messages

This commit is contained in:
Sanne Grinovero 2018-05-23 12:14:13 +01:00
parent 33e9031791
commit 97c88a7f11
1 changed files with 5 additions and 19 deletions

View File

@ -138,20 +138,12 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable {
}
public void scope(MetadataBuildingContext metadataBuildingContext) {
if ( log.isDebugEnabled() ) {
log.debugf(
"Scoping TypeConfiguration [%s] to MetadataBuildingContext [%s]",
this,
metadataBuildingContext
);
}
log.debugf( "Scoping TypeConfiguration [%s] to MetadataBuildingContext [%s]", this, metadataBuildingContext );
scope.setMetadataBuildingContext( metadataBuildingContext );
}
public MetamodelImplementor scope(SessionFactoryImplementor sessionFactory, BootstrapContext bootstrapContext) {
if ( log.isDebugEnabled() ) {
log.debugf( "Scoping TypeConfiguration [%s] to SessionFactoryImpl [%s]", this, sessionFactory );
}
log.debugf( "Scoping TypeConfiguration [%s] to SessionFactoryImpl [%s]", this, sessionFactory );
for ( Map.Entry<String, String> importEntry : scope.metadataBuildingContext.getMetadataCollector().getImports().entrySet() ) {
if ( importMap.containsKey( importEntry.getKey() ) ) {
@ -187,17 +179,13 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable {
// Instead of allowing scope#setSessionFactory to influence this, we use the SessionFactoryObserver callback
// to handle this, allowing any SessionFactory constructor code to be able to continue to have access to the
// MetadataBuildingContext through TypeConfiguration until this callback is fired.
if ( log.isDebugEnabled() ) {
log.tracef( "Handling #sessionFactoryCreated from [%s] for TypeConfiguration", factory );
}
log.tracef( "Handling #sessionFactoryCreated from [%s] for TypeConfiguration", factory );
scope.setMetadataBuildingContext( null );
}
@Override
public void sessionFactoryClosed(SessionFactory factory) {
if ( log.isDebugEnabled() ) {
log.tracef( "Handling #sessionFactoryClosed from [%s] for TypeConfiguration", factory );
}
log.tracef( "Handling #sessionFactoryClosed from [%s] for TypeConfiguration", factory );
TypeConfigurationRegistry.INSTANCE.deregisterTypeConfiguration( this );
@ -298,9 +286,7 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable {
}
public void unsetSessionFactory(SessionFactory factory) {
if ( log.isDebugEnabled() ) {
log.debugf( "Un-scoping TypeConfiguration [%s] from SessionFactory [%s]", this, factory );
}
log.debugf( "Un-scoping TypeConfiguration [%s] from SessionFactory [%s]", this, factory );
this.sessionFactory = null;
}