add an option to limit log_queue

remove some unused codes