summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManisha Aggarwal <ma9181@att.com>2017-09-26 18:20:00 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-26 18:20:00 +0000
commit06cf7ead34ea4bf5d558e5dc3b46ac2c85c61496 (patch)
tree99fafe95b46d3ffaf4633deb427fa0ccff53306e
parent7dd4a69c8a8ad55b114029fc93c20465ece7f7e9 (diff)
parent74da2543ab1a0e220e46745f3716d65a38e3c05a (diff)
Merge "Logging Updates to a few files in the common repo."
-rw-r--r--aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java6
-rw-r--r--aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java b/aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java
index 8acb954e..db72d63d 100644
--- a/aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java
+++ b/aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java
@@ -30,6 +30,9 @@ import org.json.JSONException;
import org.json.JSONObject;
import org.openecomp.aai.logging.ErrorLogHelper;
import org.openecomp.aai.util.AAIConstants;
+import org.openecomp.aai.logging.LoggingContext;
+import org.openecomp.aai.logging.LoggingContext.LoggingField;
+import org.openecomp.aai.logging.LoggingContext.StatusCode;
import javax.jms.JMSException;
import javax.jms.Message;
@@ -103,6 +106,9 @@ public class AAIDmaapEventJMSConsumer implements MessageListener {
LOGGER.info(eventName + "|" + aaiEvent);
if ("AAI-EVENT".equals(eventName)) {
this.sentWithHttp(this.httpClient, this.aaiEventUrl, aaiEvent);
+ } else {
+ LoggingContext.statusCode(StatusCode.ERROR);
+ LOGGER.error(eventName + "|Event Topic invalid.");
}
} catch (java.net.SocketException e) {
if (!e.getMessage().contains("Connection reset")) {
diff --git a/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java b/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java
index 919029a0..23e4f606 100644
--- a/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java
+++ b/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java
@@ -581,7 +581,7 @@ public class ErrorLogHelper {
.append(e.getMessage())
.toString();
- LoggingContext.responseCode(errorObject.getErrorCodeString());
+ LoggingContext.responseCode(Integer.toString(errorObject.getHTTPResponseCode().getStatusCode()));
LoggingContext.responseDescription(errorMessage);
LoggingContext.statusCode(StatusCode.ERROR);