aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/vfc
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/common/model-impl/vfc
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/common/model-impl/vfc')
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
index 0acab8b05..7cea2f181 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
@@ -26,7 +26,9 @@ import java.util.HashMap;
import java.util.Map;
import org.drools.core.WorkingMemory;
-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.rest.RestManager;
import org.onap.policy.rest.RestManager.Pair;
@@ -35,7 +37,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class VfcManager implements Runnable {
- private static final String SYSTEM_LS = System.lineSeparator();
private String vfcUrlBase;
private String username;
@@ -43,7 +44,6 @@ public final class VfcManager implements Runnable {
private VfcRequest vfcRequest;
private WorkingMemory workingMem;
private static final Logger logger = LoggerFactory.getLogger(VfcManager.class);
- private static final Logger netLogger = LoggerFactoryWrapper.getNetworkLogger();
// The REST manager used for processing REST calls for this VFC manager
private RestManager restManager;
@@ -95,7 +95,7 @@ public final class VfcManager implements Runnable {
String vfcUrl = vfcUrlBase + "/ns/" + vfcRequest.getNsInstanceId() + "/heal";
try {
String vfcRequestJson = Serialization.gsonPretty.toJson(vfcRequest);
- netLogger.info("[OUT|{}|{}|]{}{}", "VFC", vfcUrl, SYSTEM_LS, vfcRequestJson);
+ NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, vfcUrl, vfcRequestJson);
httpDetails = restManager.post(vfcUrl, username, password, headers, "application/json", vfcRequestJson);
} catch (Exception e) {
@@ -116,7 +116,7 @@ public final class VfcManager implements Runnable {
try {
VfcResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, VfcResponse.class);
- netLogger.info("[IN|{}|{}|]{}{}", "VFC", vfcUrl, SYSTEM_LS, httpDetails.second);
+ NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, vfcUrl, httpDetails.second);
String body = Serialization.gsonPretty.toJson(response);
logger.debug("Response to VFC Heal post:");
logger.debug(body);
@@ -128,10 +128,10 @@ public final class VfcManager implements Runnable {
VfcResponse responseGet = null;
while (attemptsLeft-- > 0) {
- netLogger.info("[OUT|{}|{}|]", "VFC", urlGet);
+ NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|]", "VFC", urlGet);
Pair<Integer, String> httpDetailsGet = restManager.get(urlGet, username, password, headers);
responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.second, VfcResponse.class);
- netLogger.info("[IN|{}|{}|]{}{}", "VFC", urlGet, SYSTEM_LS, httpDetailsGet.second);
+ NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, vfcUrl, httpDetailsGet.second);
responseGet.setRequestId(vfcRequest.getRequestId().toString());
body = Serialization.gsonPretty.toJson(responseGet);
logger.debug("Response to VFC Heal get:");