Logging Updates to a few files in the common repo. 25/15625/1
authorO'Connor, Lina (lo8949) <lo8949@us.att.com>
Tue, 26 Sep 2017 15:28:21 +0000 (09:28 -0600)
committerO'Connor, Lina (lo8949) <lo8949@att.com>
Tue, 26 Sep 2017 15:37:11 +0000 (09:37 -0600)
Issue-ID: AAI-387
Change-Id: I304b9d4a50cb896ab3c638d986db8450c10e5427
Signed-off-by: O'Connor, Lina (lo8949) <lo8949@att.com>
aai-core/src/main/java/org/openecomp/aai/dmaap/AAIDmaapEventJMSConsumer.java
aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java

index 8acb954..db72d63 100644 (file)
@@ -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")) {
index 919029a..23e4f60 100644 (file)
@@ -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);