Browse Source

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.
pull/395/merge
Martin Macko 9 years ago committed by Mark Paluch
parent
commit
fc377cf0f9
  1. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java

@ -276,7 +276,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { @@ -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);

Loading…
Cancel
Save