From fc377cf0f9f3d26f66fbdb796fe06952f8ba4604 Mon Sep 17 00:00:00 2001 From: Martin Macko Date: Sun, 9 Oct 2016 10:59:58 +0200 Subject: [PATCH] DATAMONGO-1205 - Log only CyclicPropertyReferenceException message. We log CyclicPropertyReferenceException with its message only and removed the stack trace from the log. The stacktrace points to a verifier location and is not particularly useful in finding the offending code. This change creates consistency over how CyclicPropertyReferenceException is logged. Original pull request: #397. --- .../mongodb/core/index/MongoPersistentEntityIndexResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java index f089a1e73..b50092031 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java @@ -276,7 +276,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { appendTextIndexInformation(propertyDotPath, indexDefinitionBuilder, mappingContext.getRequiredPersistentEntity(persistentProperty.getActualType()), optionsForNestedType, guard); } catch (CyclicPropertyReferenceException e) { - LOGGER.info(e.getMessage(), e); + LOGGER.info(e.getMessage()); } catch (InvalidDataAccessApiUsageException e) { LOGGER.info(String.format("Potentially invalid index structure discovered. Breaking operation for %s.", entity.getName()), e);