rewrite log