Added onLog event