diff --git a/src/main/java/org/springframework/data/couchbase/core/mapping/event/ValidatingCouchbaseEventListener.java b/src/main/java/org/springframework/data/couchbase/core/mapping/event/ValidatingCouchbaseEventListener.java index 18468288..fbbb4c0b 100644 --- a/src/main/java/org/springframework/data/couchbase/core/mapping/event/ValidatingCouchbaseEventListener.java +++ b/src/main/java/org/springframework/data/couchbase/core/mapping/event/ValidatingCouchbaseEventListener.java @@ -54,7 +54,9 @@ public class ValidatingCouchbaseEventListener extends AbstractCouchbaseEventList @SuppressWarnings({"rawtypes", "unchecked"}) public void onBeforeSave(Object source, CouchbaseDocument dbo) { - LOG.debug("Validating object: {}", source); + if (LOG.isDebugEnabled()) { + LOG.debug("Validating object: {}", source); + } Set violations = validator.validate(source); if (!violations.isEmpty()) {