rewrite logpatrol