(self)
Set up the global logger temporarily until we know the log stream.
Set up the global logger temporarily until we know the log stream.
Set up the global logger temporarily until we know the log stream .
def __init__(self):
        """Set up the global logger temporarily until we know the log stream."""
        # we use the awkward logging interface as we can only use basicConfig once
        # get the root logger
        root_logger = logging.getLogger()
        root_logger.setLevel(logging.INFO)
        # send to a buffer until we know where to log to
        self._logstream = io.StringIO()
        handler = logging.StreamHandler(self._logstream)
        handler.setFormatter(LOGGING_FORMATTER)
        root_logger.addHandler(handler)
def __init__ ( self ) : # we use the awkward logging interface as we can only use basicConfig once # get the root logger root_logger = logging . getLogger ( ) root_logger . setLevel ( logging . INFO ) # send to a buffer until we know where to log to self . _logstream = io . StringIO ( ) handler = logging . StreamHandler ( self . _logstream ) handler . setFormatter ( LOGGING_FORMATTER ) root_logger . addHandler ( handler )