Fixed logs

This commit is contained in:
Luca Frosini 2019-08-02 19:22:09 +02:00
parent 4badbb6392
commit b618f528b6
1 changed files with 12 additions and 11 deletions

View File

@ -52,10 +52,10 @@ public class RestSmartExecutor implements SmartExecutor {
@Context @Context
protected UriInfo uriInfo; protected UriInfo uriInfo;
protected void setCalledMethod(String method) { protected void setCalledMethod(String calledMethod) {
logger.trace("Going to set calledMethod as '{}'", method); logger.trace("Going to set calledMethod as '{}'", calledMethod);
CalledMethodProvider.instance.set(method); CalledMethodProvider.instance.set(calledMethod);
logger.info("Arrived request at /{}", uriInfo.getPath()); logger.info("Arrived request at {}", uriInfo.getAbsolutePath());
} }
protected ResponseBuilder addLocation(ResponseBuilder responseBuilder, String id) { protected ResponseBuilder addLocation(ResponseBuilder responseBuilder, String id) {
@ -167,18 +167,19 @@ public class RestSmartExecutor implements SmartExecutor {
@PathParam(UUID_PATH_PARAM) String executionIdentifier, @PathParam(UUID_PATH_PARAM) String executionIdentifier,
@QueryParam(RestConstants.UNSCHEDULE_PARAM) Boolean unschedule) throws ExecutorException { @QueryParam(RestConstants.UNSCHEDULE_PARAM) Boolean unschedule) throws ExecutorException {
if(unschedule) {
setCalledMethod(PURGE.class.getSimpleName() + " /" + RestConstants.PLUGINS_PATH_PART + "/" + pluginName
+ "/" + RestConstants.EXECUTIONS_PATH_PART + "/{" + UUID_PATH_PARAM + "}");
} else {
setCalledMethod(HttpMethod.DELETE + " /" + RestConstants.PLUGINS_PATH_PART + "/"
+ pluginName + "/" + RestConstants.EXECUTIONS_PATH_PART + "/{" + UUID_PATH_PARAM + "}");
}
try { try {
if(unschedule == null) { if(unschedule == null) {
unschedule = false; unschedule = false;
} }
if(unschedule) {
setCalledMethod(PURGE.class.getSimpleName() + " /" + RestConstants.PLUGINS_PATH_PART + "/" + pluginName
+ "/" + RestConstants.EXECUTIONS_PATH_PART + "/{" + UUID_PATH_PARAM + "}");
} else {
setCalledMethod(HttpMethod.DELETE + " /" + RestConstants.PLUGINS_PATH_PART + "/"
+ pluginName + "/" + RestConstants.EXECUTIONS_PATH_PART + "/{" + UUID_PATH_PARAM + "}");
}
logger.info("Requested to delete for {} with UUID {}{}", pluginName, executionIdentifier, logger.info("Requested to delete for {} with UUID {}{}", pluginName, executionIdentifier,
unschedule ? "globally" : ""); unschedule ? "globally" : "");