Skip to content
Snippets Groups Projects
Commit 172af7e2 authored by Christian Wulf's avatar Christian Wulf
Browse files

added log information

parent e294c07c
No related branches found
No related tags found
No related merge requests found
...@@ -17,11 +17,10 @@ public class CounterActor extends UntypedActor { ...@@ -17,11 +17,10 @@ public class CounterActor extends UntypedActor {
private final Set<Thread> threads = Collections.newSetFromMap(new ConcurrentHashMap<Thread, Boolean>()); private final Set<Thread> threads = Collections.newSetFromMap(new ConcurrentHashMap<Thread, Boolean>());
private volatile int numMessages; private int numMessages;
public CounterActor(final ActorRef watchActor) { public CounterActor(final ActorRef watchActor) {
super(); super();
LOGGER.debug("self: " + getSelf());
watchActor.tell(new WatchMe(getSelf()), getSelf()); watchActor.tell(new WatchMe(getSelf()), getSelf());
} }
...@@ -42,12 +41,11 @@ public class CounterActor extends UntypedActor { ...@@ -42,12 +41,11 @@ public class CounterActor extends UntypedActor {
private void onTerminating() { private void onTerminating() {
LOGGER.debug("Terminating..."); LOGGER.debug("Terminating...");
LOGGER.trace("Current thread: " + Thread.currentThread());
} }
@Override @Override
public void postStop() throws Exception { public void postStop() throws Exception {
LOGGER.trace("Threads (" + threads.size() + "): " + threads); LOGGER.debug("Threads (" + threads.size() + "): " + threads);
LOGGER.info(self().path().name() + ": " + numMessages + " messages"); LOGGER.info(self().path().name() + ": " + numMessages + " messages");
super.postStop(); super.postStop();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment