'Return the logs as an array of tuples.
Called parse_logs for historic reason (the old version used to store the
data in serialized format and this method needed to deserialize it to put
into the expected format)."
Returns:
An array of tuples (time created in milliseconds, the level as an
integer, the source location tuple (file, line, name), the message
proper).'

def parse_logs(self):

    return [(record.created, record.level, self._clean(record.message), record.source_location) for record in self._buffer if (not record.IsBlank())]
