DATAMONGO-1380 - Improve logging in MongoChangeSetPersister.
Add checking for debug enabling in the getPersistentId method Original pull request: #317.
This commit is contained in:
committed by
Mark Paluch
parent
bd81e25e6b
commit
42b7c42617
@@ -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)
|
* @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 {
|
public Object getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("getPersistentId called on " + entity);
|
log.debug("getPersistentId called on " + entity);
|
||||||
|
}
|
||||||
if (entityManagerFactory == null) {
|
if (entityManagerFactory == null) {
|
||||||
throw new DataAccessResourceFailureException("EntityManagerFactory cannot be null");
|
throw new DataAccessResourceFailureException("EntityManagerFactory cannot be null");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user