revise logging mechanism