Skip to content

Commit

Permalink
Log template creation and deletion (#29027)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasontedor committed Mar 13, 2018
1 parent a032337 commit 2b52043
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -117,6 +117,7 @@ public ClusterState execute(ClusterState currentState) {
}
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();
Expand Down Expand Up @@ -185,6 +186,7 @@ public ClusterState execute(ClusterState currentState) throws Exception {

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();
}

Expand Down

0 comments on commit 2b52043

Please sign in to comment.