<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getLog(self, remove=True):
 """ Retrieve buffered log data If remove is true the data will be removed from the buffer. Otherwise it will be left in the buffer """

        res = self.logs
        if remove:
            self.logs = []
        return res