diff --git a/core/src/main/groovy/com/muwire/core/EventBus.groovy b/core/src/main/groovy/com/muwire/core/EventBus.groovy index 72eead07..b7ffe806 100644 --- a/core/src/main/groovy/com/muwire/core/EventBus.groovy +++ b/core/src/main/groovy/com/muwire/core/EventBus.groovy @@ -24,7 +24,7 @@ class EventBus { } private void publishInternal(Event e) { - log.fine "publishing event $e of type ${e.getClass().getSimpleName()}" + log.fine "publishing event $e of type ${e.getClass().getSimpleName()} event $e" def currentHandlers final def clazz = e.getClass() synchronized(this) { diff --git a/core/src/main/groovy/com/muwire/core/search/QueryEvent.groovy b/core/src/main/groovy/com/muwire/core/search/QueryEvent.groovy index 378f5306..24046614 100644 --- a/core/src/main/groovy/com/muwire/core/search/QueryEvent.groovy +++ b/core/src/main/groovy/com/muwire/core/search/QueryEvent.groovy @@ -13,4 +13,8 @@ class QueryEvent extends Event { Persona originator Destination receivedOn + String toString() { + "searchEvent: $searchEvent firstHop:$firstHop, replyTo:${replyTo.toBase32()}" + + "originator: ${originator.getHumanReadableName()} receivedOn: ${receivedOn.toBase32()}" + } } diff --git a/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy b/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy index 5be1115a..c8c121b9 100644 --- a/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy +++ b/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy @@ -1,10 +1,18 @@ package com.muwire.core.search import com.muwire.core.Event +import com.muwire.core.InfoHash class SearchEvent extends Event { List searchTerms byte [] searchHash UUID uuid + + String toString() { + def infoHash = null + if (searchHash != null) + infoHash = new InfoHash(searchHash) + "searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid" + } }