fix defect on log buffer repeat write log.