Skip to content

Commit

Permalink
Refactor constant string and fix log message
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Aug 26, 2022
1 parent eae9122 commit 7d2beca
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
*/
public class RestSendToExtensionAction extends BaseRestHandler {

private static final String SEND_TO_EXTENSION_ACTION = "send_to_extension_action";
private static final Logger logger = LogManager.getLogger(RestSendToExtensionAction.class);

private final List<Route> routes;
Expand Down Expand Up @@ -77,7 +78,7 @@ public RestSendToExtensionAction(

@Override
public String getName() {
return "send_to_extension_action";
return SEND_TO_EXTENSION_ACTION;
}

@Override
Expand Down Expand Up @@ -129,7 +130,7 @@ public String executor() {
restExecuteOnExtensionResponseHandler
);
} catch (Exception e) {
logger.info("Failed to send Register REST Actions request to OpenSearch", e);
logger.info("Failed to send REST Actions to extension " + discoveryExtension.getName(), e);
}
}
}
Expand Down

0 comments on commit 7d2beca

Please sign in to comment.