summaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
authorLaMont, William(wl2432) <wl2432@att.com>2020-04-15 15:53:54 -0400
committerLaMont, William(wl2432) <wl2432@att.com>2020-04-15 15:55:08 -0400
commit05963e943e15fc653ea66fbf48854f1c608f035e (patch)
tree75fe11e9f18d6c6498a37dd1843442d273d3814e /aai-resources
parent39e529b0a7a75f730b3ec1321cb77173aafcad18 (diff)
update resources processing for v19
Issue-ID: AAI-2865 Change-Id: I2431b1414fe44e0df2874e516f551ac4c596c575 Signed-off-by: LaMont, William(wl2432) <wl2432@att.com>
Diffstat (limited to 'aai-resources')
-rw-r--r--aai-resources/src/main/java/org/onap/aai/interceptors/post/ResponseTransactionLogging.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/post/ResponseTransactionLogging.java b/aai-resources/src/main/java/org/onap/aai/interceptors/post/ResponseTransactionLogging.java
index bfc1636..2a573b3 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/post/ResponseTransactionLogging.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/post/ResponseTransactionLogging.java
@@ -58,11 +58,11 @@ public class ResponseTransactionLogging extends AAIContainerFilter implements Co
private void transLogging(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {
String logValue;
- String getValue;
+ String isGetTransactionResponseLoggingEnabled;
try {
logValue = AAIConfig.get("aai.transaction.logging");
- getValue = AAIConfig.get("aai.transaction.logging.get");
+ isGetTransactionResponseLoggingEnabled = AAIConfig.get("aai.transaction.logging.get");
} catch (AAIException e) {
return;
}
@@ -71,10 +71,6 @@ public class ResponseTransactionLogging extends AAIContainerFilter implements Co
if(Boolean.parseBoolean(logValue)){
- if(!Boolean.parseBoolean(getValue) && HttpMethod.GET.equals(httpMethod)){
- return;
- }
-
String transId = requestContext.getHeaderString(AAIHeaderProperties.TRANSACTION_ID);
String fromAppId = requestContext.getHeaderString(AAIHeaderProperties.FROM_APP_ID);
String fullUri = requestContext.getUriInfo().getRequestUri().toString();
@@ -84,7 +80,10 @@ public class ResponseTransactionLogging extends AAIContainerFilter implements Co
String status = Integer.toString(responseContext.getStatus());
String request = (String) requestContext.getProperty(AAIHeaderProperties.AAI_REQUEST);
- String response = this.getResponseString(responseContext);
+ String response = null;
+ if (!HttpMethod.GET.equals(httpMethod) || Boolean.parseBoolean(isGetTransactionResponseLoggingEnabled)) {
+ response = this.getResponseString(responseContext);
+ }
JsonObject logEntry = new JsonObject();
@@ -96,7 +95,9 @@ public class ResponseTransactionLogging extends AAIContainerFilter implements Co
logEntry.addProperty("resourceId", fullUri);
logEntry.addProperty("resourceType", httpMethod);
logEntry.addProperty("rqstBuf", Objects.toString(request, ""));
- logEntry.addProperty("respBuf", Objects.toString(response, ""));
+ if (response != null ) {
+ logEntry.addProperty("respBuf", Objects.toString(response));
+ }
try {
TRANSACTION_LOGGER.debug(logEntry.toString());