From a3c29054d01d2fefe601f0cca1f8c14f0881402e Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 19 Dec 2014 10:52:51 +0100 Subject: [PATCH] DATAMONGO-1124 - Switch log level for cyclic reference index warnings to INFO. Reduce log level from warn to info to avoid noise during application startup. Original pull request: #282. --- .../core/index/MongoPersistentEntityIndexResolver.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 7b07e113a..0b8a6de34 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 @@ -117,7 +117,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { indexInformation.add(indexDefinitionHolder); } } catch (CyclicPropertyReferenceException e) { - LOGGER.warn(e.getMessage()); + LOGGER.info(e.getMessage()); } } }); @@ -155,7 +155,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { indexInformation.addAll(resolveIndexForClass(persistentProperty.getActualType(), propertyDotPath, collection, guard)); } catch (CyclicPropertyReferenceException e) { - LOGGER.warn(e.getMessage()); + LOGGER.info(e.getMessage()); } } @@ -205,7 +205,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { appendTextIndexInformation("", indexDefinitionBuilder, root, new TextIndexIncludeOptions(IncludeStrategy.DEFAULT), new CycleGuard()); } catch (CyclicPropertyReferenceException e) { - LOGGER.warn(e.getMessage()); + LOGGER.info(e.getMessage()); } TextIndexDefinition indexDefinition = indexDefinitionBuilder.build(); @@ -256,9 +256,9 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver { appendTextIndexInformation(propertyDotPath, indexDefinitionBuilder, mappingContext.getPersistentEntity(persistentProperty.getActualType()), optionsForNestedType, guard); } catch (CyclicPropertyReferenceException e) { - LOGGER.warn(e.getMessage(), e); + LOGGER.info(e.getMessage(), e); } catch (InvalidDataAccessApiUsageException e) { - LOGGER.warn( + LOGGER.info( String.format("Potentially invald index structure discovered. Breaking operation for %s.", entity.getName()), e); }