diff --git a/core/src/main/groovy/com/muwire/core/EventBus.groovy b/core/src/main/groovy/com/muwire/core/EventBus.groovy index a02543c9..5b43ca1f 100644 --- a/core/src/main/groovy/com/muwire/core/EventBus.groovy +++ b/core/src/main/groovy/com/muwire/core/EventBus.groovy @@ -4,11 +4,14 @@ import java.util.concurrent.CopyOnWriteArrayList import com.muwire.core.files.FileSharedEvent +import groovy.util.logging.Log +@Log class EventBus { private Map handlers = new HashMap() void publish(Event e) { + log.fine "publishing event of type ${e.getClass().getSimpleName()}" def currentHandlers final def clazz = e.getClass() synchronized(handlers) { @@ -20,6 +23,7 @@ class EventBus { } synchronized void register(Class eventType, def handler) { + log.info "Registering $handler for type $eventType" def currentHandlers = handlers.get(eventType) if (currentHandlers == null) { currentHandlers = new CopyOnWriteArrayList()