'Poll all the warning loggers and extract any new warnings that have
been logged. If the warnings belong to a category that is currently
disabled, this method will discard them and they will no longer be
retrievable.
Returns a list of (timestamp, message) tuples, where timestamp is an
integer epoch timestamp.'

def _read_warnings(self):

    warnings = []
    while True:
        (loggers, _, _) = select.select(self.warning_loggers, [], [], 0)
        closed_loggers = set()
        for logger in loggers:
            line = logger.readline()
            if (len(line) == 0):
                closed_loggers.add(logger)
                continue
            (timestamp, msgtype, msg) = line.split(' DCTB ', 2)
            timestamp = int(timestamp)
            if self.warning_manager.is_valid(timestamp, msgtype):
                warnings.append((timestamp, msg.strip()))
        self.warning_loggers -= closed_loggers
        if (not loggers):
            break
    warnings.sort()
    return warnings
