Refactor logs.