summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.|\
+