summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-01-07 15:50:30 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-01-07 17:38:32 +0000
commita8f8fe2d85e9cabc33fe1358e71e18a8f7818739 (patch)
tree3ed7c6225a2b607af4426b62800115b85de7edef /src
parent79b8f5b3e2289e8e46157278308f2a6f70517b11 (diff)
Add logging for unprocessed events
Change-Id: Iccc6815cf9c6b795d0aff7f0fb8d57cff9aba936 Issue-ID: AAI-2056 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/aai/validation/controller/ValidationController.java4
-rw-r--r--src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java5
-rw-r--r--src/main/resources/validation-service-logging-resources.properties14
3 files changed, 20 insertions, 3 deletions
diff --git a/src/main/java/org/onap/aai/validation/controller/ValidationController.java b/src/main/java/org/onap/aai/validation/controller/ValidationController.java
index 60d1c1c..15e35b1 100644
--- a/src/main/java/org/onap/aai/validation/controller/ValidationController.java
+++ b/src/main/java/org/onap/aai/validation/controller/ValidationController.java
@@ -276,6 +276,7 @@ public class ValidationController {
publishValidationResults(result.validationResults);
} else {
stats.incrementEventCount(eventSource, "filtered");
+ applicationLogger.info(ApplicationMsgs.FILTERED_EVENT,event);
}
} catch (Exception e) {
applicationLogger.error(ApplicationMsgs.CANNOT_VALIDATE_ERROR, e, event);
@@ -312,10 +313,11 @@ public class ValidationController {
validationResults = modelDrivenValidator.validate(event);
stats.incrementEventCount(eventSource, "model");
} else {
- applicationLogger.debug("Event has not been validated. Invalid event type. Event :" + event);
+ applicationLogger.info(ApplicationMsgs.INVALID_EVENT_TYPE, event);
stats.incrementEventCount(eventSource, "invalid");
}
} else {
+ applicationLogger.info(ApplicationMsgs.MISSING_EVENT_TYPE, event);
stats.incrementEventCount(eventSource, "missing event type");
}
diff --git a/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java b/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java
index 6066a20..061809d 100644
--- a/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java
+++ b/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java
@@ -61,7 +61,10 @@ public enum ApplicationMsgs implements LogMessageEnum {
READ_FILE_STREAM_ERROR,
STRING_UTILS_INVALID_REGEX,
MALFORMED_REQUEST_ERROR,
- PROCESS_REQUEST_ERROR;
+ PROCESS_REQUEST_ERROR,
+ INVALID_EVENT_TYPE,
+ MISSING_EVENT_TYPE,
+ FILTERED_EVENT;
// @formatter:on
/**
diff --git a/src/main/resources/validation-service-logging-resources.properties b/src/main/resources/validation-service-logging-resources.properties
index 2cdc2e8..21cbff1 100644
--- a/src/main/resources/validation-service-logging-resources.properties
+++ b/src/main/resources/validation-service-logging-resources.properties
@@ -95,6 +95,15 @@ MESSAGE_METRIC=\
MISSING_REQUEST_ID=\
LOG0014I|\
Missing request ID. Assigned {0}|\
+INVALID_EVENT_TYPE=\
+ LOG0015I|\
+ Event has not been validated. Invalid event type. Event:{0}|\
+MISSING_EVENT_TYPE=\
+ LOG0016I|\
+ Event has not been validated. Missing event type. Event:{0}|\
+FILTERED_EVENT=\
+ LOG0017I|\
+ Event has been filtered.Event:{0}|\
MESSAGE_PUBLISH_ERROR=\
LOG0201E|\
@@ -175,4 +184,7 @@ MALFORMED_REQUEST_ERROR=\
LOG1000E|\
Malformed request.|\
-PROCESS_REQUEST_ERROR=LOG1001E|Error while processing request.| \ No newline at end of file
+PROCESS_REQUEST_ERROR=\
+ LOG1001E|\
+ Error while processing request.|\
+