add a flag whether or not add log to taskqueue.