Log more information when mappings fail on index creation (#61577)
Errors from bad mappings at index creation are currently logged at DEBUG level, which can make it difficult to work out what's going on if the index is being auto-created. This commit ups the log level to INFO for auto-created indices, and includes some more information in the log message.
This commit is contained in:
parent
4540610b62
commit
b6cb590685
|
@ -392,7 +392,8 @@ public class MetadataCreateIndexService {
|
||||||
try {
|
try {
|
||||||
updateIndexMappingsAndBuildSortOrder(indexService, request, mappings, sourceMetadata);
|
updateIndexMappingsAndBuildSortOrder(indexService, request, mappings, sourceMetadata);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug("failed on parsing mappings on index creation [{}]", request.index());
|
logger.log(silent ? Level.DEBUG : Level.INFO,
|
||||||
|
"failed on parsing mappings on index creation [{}]", request.index(), e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue