refactor fetching logs

Change-Id: Ie243393083e568eb7dfe72710d25da098a099353
Merge "refactor fetching logs"