add gather log logic