fix task logger will be called twice.