From dd64c2c344196e30543fda9a7840bd5b3e03f587 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Mon, 28 Jan 2019 21:24:13 +0100 Subject: Use helper class to retrieve network logger Instead of abusing constant from Topic interface use new dedicated helper class to retrive network logger. Issue-ID: POLICY-1486 Depends-On: Ic1f07466e1ab6abcc00098e617f0e82da19e852d Change-Id: I453a14c3dda337f2a4d08914ead32b37adc17353 Signed-off-by: Krzysztof Opasiak --- .../src/main/java/org/onap/policy/sdnc/SdncManager.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'controlloop/common/model-impl/sdnc') diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java index 2e39cd9e1..ae43200ef 100644 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java +++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java @@ -3,6 +3,7 @@ * Copyright (C) 2018 Huawei. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +28,7 @@ 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.drools.system.PolicyEngine; import org.onap.policy.rest.RestManager; import org.onap.policy.rest.RestManager.Pair; @@ -34,7 +36,7 @@ import org.onap.policy.sdnc.util.Serialization; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - + public final class SdncManager implements Runnable { private static final String SYSTEM_LS = System.lineSeparator(); @@ -44,15 +46,14 @@ public final class SdncManager implements Runnable { private SdncRequest sdncRequest; private WorkingMemory workingMem; private static final Logger logger = LoggerFactory.getLogger(SdncManager.class); - private static final Logger netLogger = - LoggerFactory.getLogger(org.onap.policy.common.endpoints.event.comm.Topic.NETWORK_LOGGER); + private static final Logger netLogger = LoggerFactoryWrapper.getNetworkLogger(); // The REST manager used for processing REST calls for this Sdnc manager private RestManager restManager; - + /** * Constructor. - * + * * @param wm Drools working memory * @param request request */ @@ -67,13 +68,13 @@ public final class SdncManager implements Runnable { restManager = new RestManager(); - setSdncParams(getPeManagerEnvProperty("sdnc.url"), getPeManagerEnvProperty("sdnc.username"), + setSdncParams(getPeManagerEnvProperty("sdnc.url"), getPeManagerEnvProperty("sdnc.username"), getPeManagerEnvProperty("sdnc.password")); } /** * Set the parameters. - * + * * @param baseUrl base URL * @param name username * @param pwd password @@ -157,7 +158,7 @@ public final class SdncManager implements Runnable { String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName); if (enginePropertyValue == null) { throw new IllegalArgumentException( - "The value of policy engine manager environment property \"" + "The value of policy engine manager environment property \"" + enginePropertyName + "\" may not be null" ); } -- cgit 1.2.3-korg