Log template creation and deletion (#29027)

These can be seen at the debug level via cluster state update logging
but really they should be more visible like index creation and
deletion. This commit adds info-level logging for template puts and
deletes.
This commit is contained in:
Jason Tedor 2018-03-13 16:31:19 -04:00 committed by GitHub
parent 697b9f8b82
commit c8e71327ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -117,6 +117,7 @@ public class MetaDataIndexTemplateService extends AbstractComponent {
}
MetaData.Builder metaData = MetaData.builder(currentState.metaData());
for (String templateName : templateNames) {
logger.info("removing template [{}]", templateName);
metaData.removeTemplate(templateName);
}
return ClusterState.builder(currentState).metaData(metaData).build();
@ -185,6 +186,7 @@ public class MetaDataIndexTemplateService extends AbstractComponent {
MetaData.Builder builder = MetaData.builder(currentState.metaData()).put(template);
logger.info("adding template [{}] for index patterns {}", request.name, request.indexPatterns);
return ClusterState.builder(currentState).metaData(builder).build();
}