Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceEvent.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceEvent.java
index 0a33777..07bd426 100644
--- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceEvent.java
+++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceEvent.java
@@ -4,6 +4,8 @@
import org.onlab.onos.net.Device;
import org.onlab.onos.net.Port;
+import static com.google.common.base.MoreObjects.toStringHelper;
+
/**
* Describes infrastructure device event.
*/
@@ -109,4 +111,12 @@
return port;
}
+ @Override
+ public String toString() {
+ if (port == null) {
+ return super.toString();
+ }
+ return toStringHelper(this).add("time", time()).add("type", type())
+ .add("subject", subject()).add("port", port).toString();
+ }
}