aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-03-14 15:24:57 +0100
committerr.bogacki <r.bogacki@samsung.com>2019-03-18 11:02:58 +0100
commitfaa0b29e3b7b1fa23a1444a5d9ac020b3c60dedc (patch)
tree4839f982eb10e66e587b55b757ffc00dd5f9d30f /bpmn/MSOCommonBPMN/src/main/java
parent4ca3abdffa40e7777a233151f66ee0b4131ed538 (diff)
Removed MsoLogger class
Bye bye MsoLogger class. Extracted constants to separated classes. Fixed imports. Change-Id: I7c8e0527e7dbd097d3ea93b9dab279354652da47 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java6
3 files changed, 7 insertions, 9 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
index 2dbf2feaf7..526f5d5288 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
@@ -35,13 +35,12 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.CryptoUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
@@ -185,7 +184,7 @@ public class BpmnRestClient {
logger.trace("request body is {}", jsonReq);
} catch(Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
index 61f92313f7..0de3414381 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
@@ -26,8 +26,8 @@ package org.onap.so.bpmn.common.workflow.context;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.TimeUnit;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -121,7 +121,6 @@ public class WorkflowContextHolder {
while (!isInterrupted()) {
try {
WorkflowContext requestObject = responseQueue.take();
- MsoLogger.setLogContext(requestObject.getRequestId(), null);
logger.debug("Time remaining for request id: {}:{}", requestObject.getRequestId(), requestObject
.getDelay
(TimeUnit.MILLISECONDS));
@@ -132,7 +131,7 @@ public class WorkflowContextHolder {
} catch (Exception e) {
logger.debug("WorkflowContextHolder timeout thread caught exception: ", e);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
+ ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
}
}
logger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 916d24e8dc..cb65f4d420 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -27,8 +27,8 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -55,7 +55,7 @@ public class ExceptionBuilder {
}
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
+ ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully
@@ -84,7 +84,7 @@ public class ExceptionBuilder {
}
}
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
+ ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully