Refactor 'diff-logger'