DATAMONGO-1380 - Improve logging in MongoChangeSetPersister.

Add checking for debug enabling in the getPersistentId method

Original pull request: #317.
This commit is contained in:
Alex Vengrovsk
2015-08-20 16:56:19 +03:00
committed by Mark Paluch
parent bd81e25e6b
commit 42b7c42617

View File

@@ -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");
}