Skip to content

Commit

Permalink
Switch to deprecation logger so message is only logged once per index
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Feb 21, 2024
1 parent 747f7c5 commit 8dd8569
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,12 @@ public MapperService(
this.idFieldDataEnabled = idFieldDataEnabled;

if (INDEX_MAPPER_DYNAMIC_SETTING.exists(indexSettings.getSettings())) {
logger.warn("Setting {} was removed after version 6.0.0, its value will be ignored.", INDEX_MAPPER_DYNAMIC_SETTING.getKey());
deprecationLogger.deprecate(
index().getName() + INDEX_MAPPER_DYNAMIC_SETTING.getKey(),
"Index [{}] has setting [{}] that was removed after version ES 6.0.0, its value will be ignored.",
index().getName(),
INDEX_MAPPER_DYNAMIC_SETTING.getKey()
);
}
}

Expand Down

0 comments on commit 8dd8569

Please sign in to comment.