(level=None)
return _logger
Turn on logging and add a handler which prints to stderr
Turn on logging and add a handler which prints to stderr
Turn on logging and add a handler which prints to stderr
def log_to_stderr(level=None):
    '''
    Turn on logging and add a handler which prints to stderr
    '''
    global _log_to_stderr
    import logging

    logger = get_logger()
    formatter = logging.Formatter(DEFAULT_LOGGING_FORMAT)
    handler = logging.StreamHandler()
    handler.setFormatter(formatter)
    logger.addHandler(handler)

    if level:
        logger.setLevel(level)
    _log_to_stderr = True
    return _logger
def log_to_stderr ( level = None ) : global _log_to_stderr import logging logger = get_logger ( ) formatter = logging . Formatter ( DEFAULT_LOGGING_FORMAT ) handler = logging . StreamHandler ( ) handler . setFormatter ( formatter ) logger . addHandler ( handler ) if level : logger . setLevel ( level ) _log_to_stderr = True return _logger