code: def getLog(self, remove=True):
          
          res = self.logs
          if remove:
              self.logs = []
          return res
docs: Retrieve buffered log data
  
          If remove is true the data will be removed from the buffer.
          Otherwise it will be left in the buffer