Skip to content

Commit f3770a4

Browse files
alexVengrovskmp911de
authored andcommitted
DATAMONGO-1380 - Improve logging in MongoChangeSetPersister.
Add checking for debug enabling in the getPersistentId method Original pull request: #317.
1 parent 38b7a72 commit f3770a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public Object doInCollection(DBCollection collection) throws MongoException, Dat
109109
* @see org.springframework.data.crossstore.ChangeSetPersister#getPersistentId(org.springframework.data.crossstore.ChangeSetBacked, org.springframework.data.crossstore.ChangeSet)
110110
*/
111111
public Object getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
112-
113-
log.debug("getPersistentId called on " + entity);
114-
112+
if (log.isDebugEnabled()) {
113+
log.debug("getPersistentId called on " + entity);
114+
}
115115
if (entityManagerFactory == null) {
116116
throw new DataAccessResourceFailureException("EntityManagerFactory cannot be null");
117117
}

0 commit comments

Comments
 (0)