Yuta HIGUCHI
Committed by Gerrit Code Review

Log more info when inter-Node messaging fails.

Change-Id: Ifd749a3023854d688a675c7279c27868b8bed436
......@@ -194,7 +194,7 @@ public class ClusterCommunicationManager
try {
clusterMessage = SERIALIZER.decode(message.payload());
} catch (Exception e) {
log.error("Failed decoding ClusterMessage", e);
log.error("Failed decoding ClusterMessage {}", message, e);
throw e;
}
try {
......
......@@ -17,6 +17,10 @@ package org.onlab.netty;
import java.io.IOException;
import org.onlab.util.ByteArraySizeHashPrinter;
import com.google.common.base.MoreObjects;
/**
* Internal message representation with additional attributes
* for supporting, synchronous request/reply behavior.
......@@ -73,6 +77,15 @@ public final class InternalMessage implements Message {
messagingService.sendAsync(sender, message);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("id", id)
.add("type", type)
.add("sender", sender)
.add("payload", ByteArraySizeHashPrinter.of(payload))
.toString();
}
/**
* Builder for InternalMessages.
......