log related fixes
Change-Id: Ie83feb7b135c046319ef76e9204b07ecc25caf02
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
index 38e1322..849ad17 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
@@ -159,7 +159,7 @@
return messagingService.sendAndReceive(nodeEp, message.subject().value(), SERIALIZER.encode(message));
} catch (IOException e) {
- log.error("Failed interaction with remote nodeId: " + toNodeId, e);
+ log.trace("Failed interaction with remote nodeId: " + toNodeId, e);
throw e;
}
}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
index ad6773e..2822f25 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
@@ -1,5 +1,7 @@
package org.onlab.onos.store.service.impl;
+import static org.slf4j.LoggerFactory.getLogger;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -16,6 +18,7 @@
import org.onlab.onos.store.service.WriteRequest;
import org.onlab.onos.store.service.WriteResult;
import org.onlab.util.KryoNamespace;
+import org.slf4j.Logger;
import com.google.common.collect.Maps;
@@ -28,6 +31,8 @@
*/
public class DatabaseStateMachine implements StateMachine {
+ private final Logger log = getLogger(getClass());
+
public static final KryoSerializer SERIALIZER = new KryoSerializer() {
@Override
protected void setupKryoPool() {
@@ -161,7 +166,7 @@
try {
return SERIALIZER.encode(state);
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Snapshot serialization error", e);
return null;
}
}
@@ -171,7 +176,7 @@
try {
this.state = SERIALIZER.decode(data);
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Snapshot deserialization error", e);
}
}
}