aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorVENKATESH KUMAR <vv770d@att.com>2018-02-28 14:12:50 -0500
committerVENKATESH KUMAR <vv770d@att.com>2018-02-28 14:13:14 -0500
commit4db8e80971cba267628c6b642aed902eabbde5d8 (patch)
treeb47ecba86ea22046b7bc37762a564a3eb197af40 /src/main/java/org
parente6cb4531f2dfd8c5e4e3b90c69891cca686142ee (diff)
fix CLM issue + logging updates
Change-Id: I73a1fdd0dc0624332fc799761e8681af7f19dd3c Signed-off-by: VENKATESH KUMAR <vv770d@att.com> Issue-ID: DCAEGEN2-360
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/dcae/commonFunction/CommonStartup.java9
-rw-r--r--src/main/java/org/onap/dcae/restapi/endpoints/EventReceipt.java5
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java b/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java
index 6b5502f7..83c81722 100644
--- a/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java
+++ b/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java
@@ -34,12 +34,13 @@ import com.att.nsa.drumlin.till.nv.rrNvReadable.loadException;
import com.att.nsa.drumlin.till.nv.rrNvReadable.missingReqdSetting;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonNode;
-import com.github.fge.jsonschema.exceptions.ProcessingException;
+import com.github.fge.jackson.JsonLoader;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.core.report.ProcessingMessage;
+import com.github.fge.jsonschema.core.report.ProcessingReport;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.main.JsonSchemaFactory;
-import com.github.fge.jsonschema.report.ProcessingMessage;
-import com.github.fge.jsonschema.report.ProcessingReport;
-import com.github.fge.jsonschema.util.JsonLoader;
+
import org.apache.catalina.LifecycleException;
import org.json.JSONArray;
import org.json.JSONException;
diff --git a/src/main/java/org/onap/dcae/restapi/endpoints/EventReceipt.java b/src/main/java/org/onap/dcae/restapi/endpoints/EventReceipt.java
index 204e5058..f5a5e6d8 100644
--- a/src/main/java/org/onap/dcae/restapi/endpoints/EventReceipt.java
+++ b/src/main/java/org/onap/dcae/restapi/endpoints/EventReceipt.java
@@ -113,7 +113,8 @@ public class EventReceipt extends NsaBaseEndpoint {
retkey = NsaBaseEndpoint.getAuthenticatedUser(ctx);
}
} catch (NullPointerException x) {
- log.info("Invalid user request " + userId + ctx.request().getContentType() + MESSAGE + jsonObject);
+ //log.info("Invalid user request :" + userId + " FROM " + ctx.request().getRemoteAddress() + " " + ctx.request().getContentType() + MESSAGE + jsonObject);
+ log.info(String.format("Unauthorized request %s FROM %s %s %s %s", getUser(ctx), ctx.request().getRemoteAddress(), ctx.request().getContentType(), MESSAGE, jsonObject));
CommonStartup.eplog.info("EVENT_RECEIPT_FAILURE: Unauthorized user" + userId + x);
respondWithCustomMsginJson(ctx, HttpStatusCodes.k401_unauthorized, "Invalid user");
return;
@@ -232,7 +233,7 @@ public class EventReceipt extends NsaBaseEndpoint {
CommonStartup.handleEvents(jsonArrayMod);
} else {
- log.info(String.format("Unauthorized request %s%s%s%s", getUser(ctx), ctx.request().getContentType(), MESSAGE,
+ log.info(String.format("Unauthorized request %s FROM %s %s %s %s", getUser(ctx), ctx.request().getRemoteAddress(), ctx.request().getContentType(), MESSAGE,
jsonObject));
respondWithCustomMsginJson(ctx, HttpStatusCodes.k401_unauthorized, "Unauthorized user");
ErrorStatus=true;