Output the log to file.

        :param string path: the path of the log file to be written

def write(self, path):
        """
        Output the log to file.

        :param string path: the path of the log file to be written
        """
        with io.open(path, "w", encoding="utf-8") as log_file:
            log_file.write(self.pretty_print())