added logEvent

* added logEvent to log the different events