tests/runtests.py
def configure_logging(log_level=None, output_stream=None):
    '''
    Configures the logging module for running tests. This automatically binds
    the helpers in lib.logutils and captures output into a specified file.
    Supplying None to the parameters will result in defaults.
    '''
    if log_level is None:
        log_level = logging.WARNING
    if output_stream is None:
        output_stream = sys.stderr

    logging.addLevelName(LOGLEVEL_NOTICE, LOGLEVELNAME_NOTICE)

    logger_instance = logging.getLogger('sublime-ycmd')
    logger_instance.propagate = False

    # handler/filter will decide how to filter, so log everything here:
    logger_instance.setLevel(logging.DEBUG)

    if logger_instance.hasHandlers():
        logger_handlers_old = [h for h in logger_instance.handlers]
        for logger_handler in logger_handlers_old:
            logger_instance.removeHandler(logger_handler)

    logger_stream = logging.StreamHandler(stream=output_stream)
    logger_stream.setLevel(log_level)
    logger_formatter = get_smart_truncate_formatter()
    logger_stream.setFormatter(logger_formatter)
    logger_instance.addHandler(logger_stream)

    Configures the logging module for running tests. This automatically binds
    the helpers in lib.logutils and captures output into a specified file.
    Supplying None to the parameters will result in defaults.
    
Configures the logging module for running tests. This automatically binds
the helpers in lib.logutils and captures output into a specified file.
Supplying None to the parameters will result in defaults.
Configures the logging module for running tests . This automatically binds the helpers in lib . logutils and captures output into a specified file . Supplying None to the parameters will result in defaults .
def configure_logging(log_level=None, output_stream=None):
    if log_level is None:
        log_level = logging.WARNING
    if output_stream is None:
        output_stream = sys.stderr
    logging.addLevelName(LOGLEVEL_NOTICE, LOGLEVELNAME_NOTICE)
    logger_instance = logging.getLogger('sublime-ycmd')
    logger_instance.propagate = False
    logger_instance.setLevel(logging.DEBUG)
    if logger_instance.hasHandlers():
        logger_handlers_old = [h for h in logger_instance.handlers]
        for logger_handler in logger_handlers_old:
            logger_instance.removeHandler(logger_handler)
    logger_stream = logging.StreamHandler(stream=output_stream)
    logger_stream.setLevel(log_level)
    logger_formatter = get_smart_truncate_formatter()
    logger_stream.setFormatter(logger_formatter)
    logger_instance.addHandler(logger_stream)
def configure_logging ( log_level = None , output_stream = None ) : if log_level is None : log_level = logging . WARNING if output_stream is None : output_stream = sys . stderr logging . addLevelName ( LOGLEVEL_NOTICE , LOGLEVELNAME_NOTICE ) logger_instance = logging . getLogger ( 'sublime-ycmd' ) logger_instance . propagate = False logger_instance . setLevel ( logging . DEBUG ) if logger_instance . hasHandlers ( ) : logger_handlers_old = [ h for h in logger_instance . handlers ] for logger_handler in logger_handlers_old : logger_instance . removeHandler ( logger_handler ) logger_stream = logging . StreamHandler ( stream = output_stream ) logger_stream . setLevel ( log_level ) logger_formatter = get_smart_truncate_formatter ( ) logger_stream . setFormatter ( logger_formatter ) logger_instance . addHandler ( logger_stream )
Configures the logging module for running tests.
Configures the logging module for running tests .
'''
    Configures the logging module for running tests. This automatically binds
    the helpers in lib.logutils and captures output into a specified file.
    Supplying None to the parameters will result in defaults.
    ''' # handler/filter will decide how to filter, so log everything here:
log_level
output_stream