Refactor the output debug log.