Refactor event mechanism
Add logger event handler