Skip to content

Commit

Permalink
Log more information when mappings fail on index creation (#61577)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
romseygeek committed Aug 27, 2020
1 parent 4540610 commit b6cb590
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ private ClusterState applyCreateIndexWithTemporaryService(final ClusterState cur
try {
updateIndexMappingsAndBuildSortOrder(indexService, request, mappings, sourceMetadata);
} 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;
}

Expand Down

0 comments on commit b6cb590

Please sign in to comment.