def logWarning(self, msg, end='\n', timestamp=True): """ Description An internal function to print warnings to stdout. Parameter msg: (str): The message to print. """ currentTime = self.getTime() if timestamp: msg = '\n{0}: Warning: {1}'.format(currentTime, msg) else: # No timestamp and no newline are mainly for verifying states and status msg = msg print('{0}'.format(msg), end=end) if self.generateLogFile: with open(self.restLogFile, 'a') as restLogFile: restLogFile.write('Warning: '+msg+end) if self.robotFrameworkStdout: self.robotStdout.log_to_console(msg)