Changed handleEvent to logEvent.