log related fixes
Change-Id: Ie83feb7b135c046319ef76e9204b07ecc25caf02
Showing
2 changed files
with
8 additions
and
3 deletions
| ... | @@ -159,7 +159,7 @@ public class ClusterCommunicationManager | ... | @@ -159,7 +159,7 @@ public class ClusterCommunicationManager |
| 159 | return messagingService.sendAndReceive(nodeEp, message.subject().value(), SERIALIZER.encode(message)); | 159 | return messagingService.sendAndReceive(nodeEp, message.subject().value(), SERIALIZER.encode(message)); |
| 160 | 160 | ||
| 161 | } catch (IOException e) { | 161 | } catch (IOException e) { |
| 162 | - log.error("Failed interaction with remote nodeId: " + toNodeId, e); | 162 | + log.trace("Failed interaction with remote nodeId: " + toNodeId, e); |
| 163 | throw e; | 163 | throw e; |
| 164 | } | 164 | } |
| 165 | } | 165 | } | ... | ... |
| 1 | package org.onlab.onos.store.service.impl; | 1 | package org.onlab.onos.store.service.impl; |
| 2 | 2 | ||
| 3 | +import static org.slf4j.LoggerFactory.getLogger; | ||
| 4 | + | ||
| 3 | import java.util.ArrayList; | 5 | import java.util.ArrayList; |
| 4 | import java.util.List; | 6 | import java.util.List; |
| 5 | import java.util.Map; | 7 | import java.util.Map; |
| ... | @@ -16,6 +18,7 @@ import org.onlab.onos.store.service.VersionedValue; | ... | @@ -16,6 +18,7 @@ import org.onlab.onos.store.service.VersionedValue; |
| 16 | import org.onlab.onos.store.service.WriteRequest; | 18 | import org.onlab.onos.store.service.WriteRequest; |
| 17 | import org.onlab.onos.store.service.WriteResult; | 19 | import org.onlab.onos.store.service.WriteResult; |
| 18 | import org.onlab.util.KryoNamespace; | 20 | import org.onlab.util.KryoNamespace; |
| 21 | +import org.slf4j.Logger; | ||
| 19 | 22 | ||
| 20 | import com.google.common.collect.Maps; | 23 | import com.google.common.collect.Maps; |
| 21 | 24 | ||
| ... | @@ -28,6 +31,8 @@ import com.google.common.collect.Maps; | ... | @@ -28,6 +31,8 @@ import com.google.common.collect.Maps; |
| 28 | */ | 31 | */ |
| 29 | public class DatabaseStateMachine implements StateMachine { | 32 | public class DatabaseStateMachine implements StateMachine { |
| 30 | 33 | ||
| 34 | + private final Logger log = getLogger(getClass()); | ||
| 35 | + | ||
| 31 | public static final KryoSerializer SERIALIZER = new KryoSerializer() { | 36 | public static final KryoSerializer SERIALIZER = new KryoSerializer() { |
| 32 | @Override | 37 | @Override |
| 33 | protected void setupKryoPool() { | 38 | protected void setupKryoPool() { |
| ... | @@ -161,7 +166,7 @@ public class DatabaseStateMachine implements StateMachine { | ... | @@ -161,7 +166,7 @@ public class DatabaseStateMachine implements StateMachine { |
| 161 | try { | 166 | try { |
| 162 | return SERIALIZER.encode(state); | 167 | return SERIALIZER.encode(state); |
| 163 | } catch (Exception e) { | 168 | } catch (Exception e) { |
| 164 | - e.printStackTrace(); | 169 | + log.error("Snapshot serialization error", e); |
| 165 | return null; | 170 | return null; |
| 166 | } | 171 | } |
| 167 | } | 172 | } |
| ... | @@ -171,7 +176,7 @@ public class DatabaseStateMachine implements StateMachine { | ... | @@ -171,7 +176,7 @@ public class DatabaseStateMachine implements StateMachine { |
| 171 | try { | 176 | try { |
| 172 | this.state = SERIALIZER.decode(data); | 177 | this.state = SERIALIZER.decode(data); |
| 173 | } catch (Exception e) { | 178 | } catch (Exception e) { |
| 174 | - e.printStackTrace(); | 179 | + log.error("Snapshot deserialization error", e); |
| 175 | } | 180 | } |
| 176 | } | 181 | } |
| 177 | } | 182 | } | ... | ... |
-
Please register or login to post a comment