diff options
author | Daniel Cruz <dc443y@att.com> | 2019-03-11 15:29:14 -0500 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2019-03-19 11:43:44 +0000 |
commit | 71513a08caa8fd80c732d53d97b242e4b3a3f5c6 (patch) | |
tree | 7908248883a94b7dd8c9586b0bd30940881c10b2 /controlloop/common/guard/src/main | |
parent | f3260414bad28d0a807e60f703f1d87a1cc38f6a (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/common/guard/src/main')
-rw-r--r-- | controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java | 12 |
1 files changed, 5 insertions, 7 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 f9a01a70c..8b4c832da 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 @@ -42,7 +42,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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,10 +52,6 @@ import org.slf4j.LoggerFactory; public class PolicyGuardXacmlHelper { private static final Logger logger = LoggerFactory.getLogger(PolicyGuardXacmlHelper.class); - private static final Logger netLogger = LoggerFactoryWrapper.getNetworkLogger(); - - // Constant for the systme line separator - private static final String SYSTEM_LS = System.lineSeparator(); private UrlEntry[] restUrls = null; private int restUrlIndex = 0; @@ -115,10 +113,10 @@ public class PolicyGuardXacmlHelper { // 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); } |