Merge changes I34538a22,I520b0d83
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / common / actor / AbstractUntypedPersistentActor.java
index 36b2866210cadb84d9db0ab28c5a8137236254a7..326733f377e21d62fcf4865a0eeab10ad14e7ad6 100644 (file)
@@ -8,18 +8,17 @@
 
 package org.opendaylight.controller.cluster.common.actor;
 
-import akka.event.Logging;
-import akka.event.LoggingAdapter;
 import akka.persistence.UntypedPersistentActor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractUntypedPersistentActor extends UntypedPersistentActor {
 
-    protected final LoggingAdapter LOG =
-        Logging.getLogger(getContext().system(), this);
+    protected final Logger LOG = LoggerFactory.getLogger(getClass());
 
     public AbstractUntypedPersistentActor() {
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("Actor created {}", getSelf());
+        if(LOG.isTraceEnabled()) {
+            LOG.trace("Actor created {}", getSelf());
         }
         getContext().
             system().
@@ -31,24 +30,24 @@ public abstract class AbstractUntypedPersistentActor extends UntypedPersistentAc
 
     @Override public void onReceiveCommand(Object message) throws Exception {
         final String messageType = message.getClass().getSimpleName();
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("Received message {}", messageType);
+        if(LOG.isTraceEnabled()) {
+            LOG.trace("Received message {}", messageType);
         }
         handleCommand(message);
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("Done handling message {}", messageType);
+        if(LOG.isTraceEnabled()) {
+            LOG.trace("Done handling message {}", messageType);
         }
 
     }
 
     @Override public void onReceiveRecover(Object message) throws Exception {
         final String messageType = message.getClass().getSimpleName();
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("Received message {}", messageType);
+        if(LOG.isTraceEnabled()) {
+            LOG.trace("Received message {}", messageType);
         }
         handleRecover(message);
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("Done handling message {}", messageType);
+        if(LOG.isTraceEnabled()) {
+            LOG.trace("Done handling message {}", messageType);
         }
 
     }