add collect log for flush