appends input string to log file and sends it to log function (self.log_function)
        Returns:

def log(self, string):
        """
        appends input string to log file and sends it to log function (self.log_function)
        Returns:

        """

        self.log_data.append(string)
        if self.log_function is None:
            print(string)
        else:
            self.log_function(string)