Skip to content

Commit

Permalink
[Transform] Do not mention "deduce mappings" in audit log when the de…
Browse files Browse the repository at this point in the history
…duce_mappings setting is disabled (elastic#83330)
  • Loading branch information
przemekwitek authored Feb 1, 2022
1 parent 6383d22 commit fd0e252
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ protected void masterOperation(

if (dest.length == 0) {
createDestinationIndex(transformConfigHolder.get(), validationResponse.getDestIndexMappings(), ActionListener.wrap(r -> {
auditor.info(request.getId(), "Created destination index [" + destinationIndex + "] with deduced mappings.");
String message = Boolean.FALSE.equals(transformConfigHolder.get().getSettings().getDeduceMappings())
? "Created destination index [" + destinationIndex + "]."
: "Created destination index [" + destinationIndex + "] with deduced mappings.";
auditor.info(request.getId(), message);
createOrGetIndexListener.onResponse(r);
}, createOrGetIndexListener::onFailure));
} else {
Expand Down

0 comments on commit fd0e252

Please sign in to comment.