Pull-Request for Improving the behavior of recording event log

Hi,
Please read this.