summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-08-09 17:13:55 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-09 17:15:39 -0400
commit1d89d390bf0ba05c7953f19d1dd4c48cebed7b24 (patch)
treeb3d145344752267533e1d05b73a92c9b7ba36bc5
parent3da1395bc41159cb8d1f417c19b34bd9638aedbe (diff)
refactor to use common.utils.logging
using utils.logging from common repo Issue-ID: POLICY-3087 Change-Id: I60fb7eb47e38ae776f1d23926b551667c555700a Signed-off-by: Taka Cho <takamune.cho@att.com>
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java6
-rw-r--r--controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java6
-rw-r--r--controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java10
3 files changed, 11 insertions, 11 deletions
diff --git a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
index 94aa22485..b9caef9da 100644
--- a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
+++ b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ import org.junit.Test;
import org.kie.api.builder.ReleaseId;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.utils.logging.LoggerUtils;
import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.drools.persistence.SystemPersistenceConstants;
import org.onap.policy.drools.properties.DroolsPropertyConstants;
@@ -45,7 +46,6 @@ import org.onap.policy.drools.system.PolicyControllerConstants;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.drools.util.KieUtils;
-import org.onap.policy.drools.utils.logging.LoggerUtil;
import org.onap.policy.simulators.Util;
/**
@@ -94,7 +94,7 @@ public class RestControlLoopManagerTest {
@BeforeClass
public static void setUp() throws Exception {
System.setProperty("kie.maven.settings.custom", "src/test/resources/settings.xml");
- LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "WARN");
+ LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "WARN");
SystemPersistenceConstants.getManager().setConfigurationDir("src/test/resources");
PolicyEngineConstants.getManager()
diff --git a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
index db0c7a4ef..069b370b6 100644
--- a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
+++ b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
@@ -24,8 +24,8 @@ import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.utils.logging.LoggerUtils;
import org.onap.policy.drools.system.PolicyEngineConstants;
-import org.onap.policy.drools.utils.logging.LoggerUtil;
import org.onap.policy.simulators.Util;
/**
@@ -35,8 +35,8 @@ public class ControlLoopUtilsFeatureTest {
@Test
public void testSimulate() {
- LoggerUtil.setLevel("ROOT", "INFO");
- LoggerUtil.setLevel("org.eclipse.jetty", "WARN");
+ LoggerUtils.setLevel("ROOT", "INFO");
+ LoggerUtils.setLevel("org.eclipse.jetty", "WARN");
final ControlLoopUtilsFeature feature = new ControlLoopUtilsFeature();
feature.afterStart(PolicyEngineConstants.getManager());
assertNotNull(HttpServletServerFactoryInstance.getServerFactory().get(Util.AAISIM_SERVER_PORT));
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java
index 06eab0d88..09eb58d5a 100644
--- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java
+++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java
@@ -48,6 +48,7 @@ import org.kie.api.event.rule.RuleRuntimeEventListener;
import org.kie.api.runtime.KieSession;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
+import org.onap.policy.common.utils.logging.LoggerUtils;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.controlloop.ControlLoopEvent;
import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
@@ -61,7 +62,6 @@ import org.onap.policy.drools.system.PolicyControllerFactory;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.drools.util.KieUtils;
-import org.onap.policy.drools.utils.logging.LoggerUtil;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.slf4j.Logger;
@@ -257,10 +257,10 @@ public class Rules {
* Sets up overall logging.
*/
private void setupLogging() {
- LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "WARN");
- LoggerUtil.setLevel("org.eclipse.jetty", "WARN");
- LoggerUtil.setLevel("org.onap.policy.controlloop", "INFO");
- LoggerUtil.setLevel("network", "INFO");
+ LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "WARN");
+ LoggerUtils.setLevel("org.eclipse.jetty", "WARN");
+ LoggerUtils.setLevel("org.onap.policy.controlloop", "INFO");
+ LoggerUtils.setLevel("network", "INFO");
}
/**