aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors
diff options
context:
space:
mode:
authorMagnusen, Drew (dm741q) <dm741q@att.com>2017-08-24 11:37:46 -0500
committerMagnusen, Drew (dm741q) <dm741q@att.com>2017-08-28 13:07:09 -0500
commit11e0afc41aa47b9b5fe36c6c654c5b7493e4ba46 (patch)
treeb05742106ad95c9f47a006f36eb87aabb784ca1e /controlloop/common/actors
parentd03507850e293674cc118f76bab0629d457179ae (diff)
Removal of sys.out/err with logger messages
Removed any use of System.out.println or System.err.println and replaced with relevant logger statements. Issue-ID: POLICY-176 Change-Id: I91513267635bfb2a34f2a9650c48f367d53fc842 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'controlloop/common/actors')
-rw-r--r--controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java13
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java9
2 files changed, 14 insertions, 8 deletions
diff --git a/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java b/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java
index f6eba49af..e526abd41 100644
--- a/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java
+++ b/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java
@@ -24,23 +24,26 @@ import static org.junit.Assert.*;
import org.onap.policy.controlloop.actorServiceProvider.ActorService;
import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class Test {
-
+ private static final Logger logger = LoggerFactory.getLogger(Test.class);
+
@org.junit.Test
public void test() {
- System.out.println("Dumping actors");
+ logger.debug("Dumping actors");
ActorService actorService = ActorService.getInstance();
assertNotNull(actorService);
int num = 0;
for (Actor actor : actorService.actors()) {
- System.out.println(actor.actor());
+ logger.debug(actor.actor());
for (String recipe : actor.recipes()) {
- System.out.println("\t" + recipe + " " + actor.recipeTargets(recipe) + " " + actor.recipePayloads(recipe));
+ logger.debug("\t {} {} {}", recipe, actor.recipeTargets(recipe), actor.recipePayloads(recipe));
}
num++;
}
- System.out.println("Found " + num + " actors");
+ logger.debug("Found {} actors", num);
}
}
diff --git a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
index 2632d0752..330b1f97c 100644
--- a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
+++ b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
@@ -24,10 +24,13 @@ import java.util.Iterator;
import java.util.ServiceLoader;
import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
public class ActorService {
-
+
+ private static final Logger logger = LoggerFactory.getLogger(ActorService.class);
private static ActorService service;
private ServiceLoader<Actor> loader;
@@ -45,9 +48,9 @@ public class ActorService {
public ImmutableList<Actor> actors() {
Iterator<Actor> iter = loader.iterator();
- System.out.println("returning actors");
+ logger.debug("returning actors");
while (iter.hasNext()) {
- System.out.println("Got " + iter.next().actor());
+ logger.debug("Got {}", iter.next().actor());
}
return ImmutableList.copyOf(loader.iterator());