Log an error or print in stdout if no logger.

def log_error(self, msg, *args):
        """Log an error or print in stdout if no logger."""
        if self._logger is not None:
            self._logger.error(msg, *args)
        else:
            print(msg % args)