From 48877079cadcee9de34cacfb97f48130bff6e2a6 Mon Sep 17 00:00:00 2001 From: meeh <meeh@mail.i2p> Date: Thu, 11 Oct 2018 11:50:00 +0000 Subject: [PATCH] OSX Launcher: Log all events for debugging --- launchers/macosx/I2PLauncher/Utils/EventManager.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/launchers/macosx/I2PLauncher/Utils/EventManager.swift b/launchers/macosx/I2PLauncher/Utils/EventManager.swift index e519d8ccef..87b4d5f555 100644 --- a/launchers/macosx/I2PLauncher/Utils/EventManager.swift +++ b/launchers/macosx/I2PLauncher/Utils/EventManager.swift @@ -8,6 +8,8 @@ import Foundation +// TODO: Log all events? + class EventManager { var listeners = Dictionary<String, NSMutableArray>(); @@ -51,6 +53,7 @@ class EventManager { // @param eventName: Matching listener eventNames will fire when this is called // @param information: pass values to your listeners func trigger(eventName:String, information:Any? = nil) { + print("Event: ", eventName, " will trigger ", self.listeners[eventName]?.count ?? 0, " listeners") if let actionObjects = self.listeners[eventName] { for actionObject in actionObjects { if let actionToPerform = actionObject as? EventListenerAction { -- GitLab