HHH-8510 - Add a Logger which is able to monitor the creation of new Sessions at DEBUG/TRACE level

This commit is contained in:
Steve Ebersole 2013-09-17 13:11:55 -05:00
parent 8dae133bba
commit 2fd4a75a78
1 changed files with 3 additions and 0 deletions

View File

@ -1536,6 +1536,8 @@ public final class SessionFactoryImpl
}
static class SessionBuilderImpl implements SessionBuilderImplementor {
private static final Logger log = CoreLogging.logger( SessionBuilderImpl.class );
private final SessionFactoryImpl sessionFactory;
private SessionOwner sessionOwner;
private Interceptor interceptor;
@ -1568,6 +1570,7 @@ public final class SessionFactoryImpl
@Override
public Session openSession() {
log.tracef( "Opening Hibernate Session. tenant=%s, owner=%s", tenantIdentifier, sessionOwner );
return new SessionImpl(
connection,
sessionFactory,