unify log_task_wrapper and log_deploy_warpper

These two log wrappers are implemented in nearly same way. This patch
merge it into one wrapper.

At the same time, those two method are not removed, because I think this
is a good way to keep code compatibility.

Change-Id: Ibd0f1d1f6a28acfd30e29d21446171f9a2f15ded