Skip to content

Commit 80916b9

Browse files
committed
add logging of initator
1 parent 6e15b5c commit 80916b9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

hibernate-core/src/main/java/org/hibernate/integrator/internal/IntegratorServiceImpl.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,35 @@
2626
import java.util.LinkedHashSet;
2727
import java.util.ServiceLoader;
2828

29+
import org.jboss.logging.Logger;
30+
2931
import org.hibernate.cfg.beanvalidation.BeanValidationIntegrator;
3032
import org.hibernate.cfg.search.HibernateSearchIntegrator;
3133
import org.hibernate.integrator.spi.Integrator;
3234
import org.hibernate.integrator.spi.IntegratorService;
35+
import org.hibernate.internal.CoreMessageLogger;
3336
import org.hibernate.service.spi.ServiceRegistryImplementor;
3437

3538
/**
3639
* @author Steve Ebersole
3740
*/
3841
public class IntegratorServiceImpl implements IntegratorService {
42+
private static final CoreMessageLogger LOG = Logger.getMessageLogger(
43+
CoreMessageLogger.class, IntegratorServiceImpl.class.getName());
3944
private final ServiceRegistryImplementor serviceRegistry;
4045
private LinkedHashSet<Integrator> integrators = new LinkedHashSet<Integrator>();
4146

4247
public IntegratorServiceImpl(ServiceRegistryImplementor serviceRegistry) {
4348
this.serviceRegistry = serviceRegistry;
4449
// Standard integrators nameable from here. Envers and JPA, for example, need to be handled by discovery
4550
// because in separate project/jars
46-
integrators.add( new BeanValidationIntegrator() );
47-
integrators.add( new HibernateSearchIntegrator() );
51+
addIntegrator( new BeanValidationIntegrator() );
52+
addIntegrator( new HibernateSearchIntegrator() );
4853
}
4954

5055
@Override
5156
public void addIntegrator(Integrator integrator) {
57+
LOG.debugf( "Adding Integrator [%s].", integrator.getClass().getName() );
5258
integrators.add( integrator );
5359
}
5460

@@ -58,6 +64,7 @@ public Iterable<Integrator> getIntegrators() {
5864
integrators.addAll( this.integrators );
5965

6066
for ( Integrator integrator : ServiceLoader.load( Integrator.class ) ) {
67+
LOG.debugf( "Adding Integrator [%s].", integrator.getClass().getName() );
6168
integrators.add( integrator );
6269
}
6370

0 commit comments

Comments
 (0)