@classmethod
def output(cls, file_desc):
    """
        Output all message to the given file handler.
        The heap is unaltered, see clear()
        """
    for message, level, _ in cls.__pending_messages:
        print(level, ':', message, file=file_desc)
