hooking the js events to the logger