Add a debugging aid in API of external event model
authorChristos KK Loverdos <loverdos@gmail.com>
Thu, 24 May 2012 12:48:57 +0000 (15:48 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Thu, 24 May 2012 12:48:57 +0000 (15:48 +0300)
src/main/scala/gr/grnet/aquarium/event/model/ExternalEventModel.scala

index fff46b9..4530a7a 100644 (file)
@@ -36,6 +36,7 @@
 package gr.grnet.aquarium.event.model
 
 import gr.grnet.aquarium.util.makeBytes
+import gr.grnet.aquarium.util.shortClassNameOf
 import gr.grnet.aquarium.util.json.JsonSupport
 import gr.grnet.aquarium.util.xml.XmlSupport
 
@@ -57,6 +58,8 @@ trait ExternalEventModel extends EventModel with JsonSupport with XmlSupport {
   def toBytes: Array[Byte] = makeBytes(toJsonString)
 
   def withReceivedMillis(newReceivedMillis: Long): ExternalEventModel
+
+  def toDebugString = "%s(userID=%s, id=%s)".format(shortClassNameOf(this), userID, id)
 }
 
 object ExternalEventModel {