def filter(self, record):
    current_log = (record.levelno, record.pathname, record.lineno, record.msg, record.args)
    if (current_log != self.last_log):
        self.last_log = current_log
        return True
    return False
def filter(self, record):
    current_log = (record.levelno, record.pathname, record.lineno, record.msg, record.args)
    if (current_log != self.last_log):
        self.last_log = current_log
        return True
    return False