def log(self, txt: str) -> bool:
        """ Log txt (if any) to the log file (if any). Return value indicates whether it is ok to terminate on the first
        error or whether we need to continue processing.

        :param txt: text to log.
        :return: True if we aren't logging, False if we are.
        """
        self.nerrors += 1
        if self._logfile is not None:
            print(txt, file=self._logfile)
        return not self.logging
Log txt (if any) to the log file (if any). Return value indicates whether it is ok to terminate on the first
        error or whether we need to continue processing.

        :param txt: text to log.
        :return: True if we aren't logging, False if we are.