summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo.clc
diff options
context:
space:
mode:
authorDaniel Cruz <dc443y@att.com>2019-03-11 15:29:14 -0500
committerPamela Dragosh <pdragosh@research.att.com>2019-03-19 11:43:44 +0000
commit71513a08caa8fd80c732d53d97b242e4b3a3f5c6 (patch)
tree7908248883a94b7dd8c9586b0bd30940881c10b2 /controlloop/templates/template.demo.clc
parentf3260414bad28d0a807e60f703f1d87a1cc38f6a (diff)
Change LoggerFactoryWrapper to NetLoggerUtil
Removed LoggerFactoryWrapper references to use NetLoggerUtil. Issue-ID: POLICY-1499 Change-Id: I6f7066f4523736672e17d2e1e609c38c44852769 Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/templates/template.demo.clc')
-rw-r--r--controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
index 075482ee2..d51a862db 100644
--- a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
+++ b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
@@ -48,7 +48,9 @@ import java.util.UUID;
import org.apache.commons.io.IOUtils;
import org.apache.http.entity.ContentType;
import org.json.JSONObject;
-import org.onap.policy.common.utils.slf4j.LoggerFactoryWrapper;
+import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.guard.PolicyGuardResponse;
import org.onap.policy.guard.PolicyGuardXacmlRequestAttributes;
@@ -59,10 +61,7 @@ import org.slf4j.LoggerFactory;
public class PolicyGuardXacmlHelperEmbedded {
private static final Logger logger = LoggerFactory.getLogger(PolicyGuardXacmlHelperEmbedded.class);
- private static final Logger netLogger = LoggerFactoryWrapper.getNetworkLogger();
- // Constant for the system line separator
- private static final String SYSTEM_LS = System.lineSeparator();
private String propfile;
private UrlEntry[] restUrls = null;
private int restUrlIndex = 0;
@@ -128,10 +127,10 @@ public class PolicyGuardXacmlHelperEmbedded {
//
UrlEntry urlEntry = restUrls[restUrlIndex];
String jsonRequestString = jsonReq.toString();
- netLogger.info("[OUT|{}|{}|]{}{}", "GUARD", urlEntry.restUrl, SYSTEM_LS, jsonRequestString);
+ NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, urlEntry.restUrl.toString(), jsonRequestString);
response = callRestfulPdp(new ByteArrayInputStream(jsonReq.toString().getBytes()), urlEntry.restUrl,
urlEntry.authorization, urlEntry.clientAuth, urlEntry.environment);
- netLogger.info("[IN|{}|{}|]{}{}", "GUARD", urlEntry.restUrl, SYSTEM_LS, response);
+ NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, urlEntry.restUrl.toString(), response);
} catch (Exception e) {
logger.error("Error in sending RESTful request", e);
}