summaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard/src
diff options
context:
space:
mode:
authorMagnusen, Drew (dm741q) <dm741q@att.com>2017-10-19 14:26:32 -0500
committerMagnusen, Drew (dm741q) <dm741q@att.com>2017-10-20 11:09:04 -0500
commit2f1ee658482437e0c5b45451d20468411e2e2b6a (patch)
tree40a95190ceb69cb36a254c38742babffb9bae152 /controlloop/common/guard/src
parent0f4579198b531a38cdef06bbeb4f51302730e4ba (diff)
Added log output to multiple drools applications.
Added logger statments to network.log for AAI, SO, PDPX Guard, and VFC for all inbound/outbound traffic. Issue-Id: POLICY-356 Change-Id: I802d45d8136f987b4304baa8f17e166b1c8df165 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'controlloop/common/guard/src')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
index 0ecfaa6c4..b24cc3906 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
@@ -51,6 +51,8 @@ public class PolicyGuardXacmlHelper {
private static final Logger logger = LoggerFactory
.getLogger(PolicyGuardXacmlHelper.class);
+
+ private static final Logger netLogger = LoggerFactory.getLogger(org.onap.policy.drools.event.comm.Topic.NETWORK_LOGGER);
public PolicyGuardXacmlHelper() {
init(PolicyEngine.manager.getEnvironment());
@@ -108,10 +110,12 @@ public class PolicyGuardXacmlHelper {
//
// Call RESTful PDP
//
+ netLogger.info("[OUT|{}|{}|]{}{}", "GUARD", urlEntry.restURL, System.lineSeparator(), jsonReq.toString());
response = callRESTfulPDP(new ByteArrayInputStream(jsonReq
.toString().getBytes()), urlEntry.restURL,
urlEntry.authorization, urlEntry.clientAuth,
urlEntry.environment);
+ netLogger.info("[IN|{}{}|]{}{}", "GUARD", urlEntry.restURL, System.lineSeparator(), response);
} catch (Exception e) {
logger.error("Error in sending RESTful request: ", e);
}