log refactor