Skip to content

Commit a3c2905

Browse files
christophstroblodrotbohm
authored andcommitted
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: spring-projects#282.
1 parent 01533ca commit a3c2905

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
117117
indexInformation.add(indexDefinitionHolder);
118118
}
119119
} catch (CyclicPropertyReferenceException e) {
120-
LOGGER.warn(e.getMessage());
120+
LOGGER.info(e.getMessage());
121121
}
122122
}
123123
});
@@ -155,7 +155,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
155155
indexInformation.addAll(resolveIndexForClass(persistentProperty.getActualType(), propertyDotPath,
156156
collection, guard));
157157
} catch (CyclicPropertyReferenceException e) {
158-
LOGGER.warn(e.getMessage());
158+
LOGGER.info(e.getMessage());
159159
}
160160
}
161161

@@ -205,7 +205,7 @@ private Collection<? extends IndexDefinitionHolder> potentiallyCreateTextIndexDe
205205
appendTextIndexInformation("", indexDefinitionBuilder, root,
206206
new TextIndexIncludeOptions(IncludeStrategy.DEFAULT), new CycleGuard());
207207
} catch (CyclicPropertyReferenceException e) {
208-
LOGGER.warn(e.getMessage());
208+
LOGGER.info(e.getMessage());
209209
}
210210

211211
TextIndexDefinition indexDefinition = indexDefinitionBuilder.build();
@@ -256,9 +256,9 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
256256
appendTextIndexInformation(propertyDotPath, indexDefinitionBuilder,
257257
mappingContext.getPersistentEntity(persistentProperty.getActualType()), optionsForNestedType, guard);
258258
} catch (CyclicPropertyReferenceException e) {
259-
LOGGER.warn(e.getMessage(), e);
259+
LOGGER.info(e.getMessage(), e);
260260
} catch (InvalidDataAccessApiUsageException e) {
261-
LOGGER.warn(
261+
LOGGER.info(
262262
String.format("Potentially invald index structure discovered. Breaking operation for %s.",
263263
entity.getName()), e);
264264
}

0 commit comments

Comments
 (0)