HHH-13576 A couple more Logger mistakes in SessionImpl

This commit is contained in:
Sanne Grinovero 2019-08-14 11:07:46 +01:00
parent 7746227115
commit e110ab0030
1 changed files with 11 additions and 7 deletions

View File

@ -958,12 +958,14 @@ public final class SessionImpl
}
private void logRemoveOrphanBeforeUpdates(String timing, String entityName, Object entity) {
final EntityEntry entityEntry = persistenceContext.getEntry( entity );
log.tracef(
"%s remove orphan before updates: [%s]",
timing,
entityEntry == null ? entityName : MessageHelper.infoString( entityName, entityEntry.getId() )
);
if ( log.isTraceEnabled() ) {
final EntityEntry entityEntry = persistenceContext.getEntry( entity );
log.tracef(
"%s remove orphan before updates: [%s]",
timing,
entityEntry == null ? entityName : MessageHelper.infoString( entityName, entityEntry.getId() )
);
}
}
private void fireDelete(DeleteEvent event) {
@ -2526,7 +2528,9 @@ public final class SessionImpl
@Override
public void afterTransactionCompletion(boolean successful, boolean delayed) {
log.tracef( "SessionImpl#afterTransactionCompletion(successful=%s, delayed=%s)", successful, delayed );
if ( log.isTraceEnabled() ) {
log.tracef( "SessionImpl#afterTransactionCompletion(successful=%s, delayed=%s)", successful, delayed );
}
if ( !isClosed() || waitingForAutoClose ) {
if ( autoClear ||!successful ) {