Browse Source

DATAMONGO-1380 - Improve logging in MongoChangeSetPersister.

Add checking for debug enabling in the getPersistentId method

Original pull request: #317.
1.7.x
Alex Vengrovsk 10 years ago committed by Mark Paluch
parent
commit
f3770a4066
  1. 6
      spring-data-mongodb-cross-store/src/main/java/org/springframework/data/mongodb/crossstore/MongoChangeSetPersister.java

6
spring-data-mongodb-cross-store/src/main/java/org/springframework/data/mongodb/crossstore/MongoChangeSetPersister.java

@ -109,9 +109,9 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> { @@ -109,9 +109,9 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
* @see org.springframework.data.crossstore.ChangeSetPersister#getPersistentId(org.springframework.data.crossstore.ChangeSetBacked, org.springframework.data.crossstore.ChangeSet)
*/
public Object getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
log.debug("getPersistentId called on " + entity);
if (log.isDebugEnabled()) {
log.debug("getPersistentId called on " + entity);
}
if (entityManagerFactory == null) {
throw new DataAccessResourceFailureException("EntityManagerFactory cannot be null");
}

Loading…
Cancel
Save