Fix additional exception logging call
This commit modifies an exception logging calls to use a parameterized message from Log4j. Original commit: elastic/x-pack-elasticsearch@7b0df7d056
This commit is contained in:
parent
7a3d416558
commit
b29cdc0877
|
@ -115,7 +115,9 @@ public class ActionWrapper implements ToXContent {
|
|||
new Action.Result.ConditionFailed(action.type(), "condition not met. skipping"));
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
action.logger().error("failed to execute action [{}/{}]. failed to execute condition", e, ctx.watch().id(), id);
|
||||
action.logger().error(
|
||||
(Supplier<?>) () -> new ParameterizedMessage(
|
||||
"failed to execute action [{}/{}]. failed to execute condition", ctx.watch().id(), id), e);
|
||||
return new ActionWrapper.Result(id, new Action.Result.ConditionFailed(action.type(),
|
||||
"condition failed. skipping: {}", e.getMessage()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue