Sets the appropriate verbosity.
        Must be called after self._test_target_files so that self.target_files is properly set.
197167
def _set_verbosity(self):
        '''
        
        '''
        # If more than one target file was specified, enable verbose mode; else, there is
        # nothing in some outputs to indicate which scan corresponds to which
        # file.
        if len(self.target_files) > 1 and not self.verbose:
            self.verbose = True
201482
def do_set_log_file(self, args):
        
        params = args.split()
        try:
            filename = params[0]
            logging.basicConfig(filename=filename)
        except IndexError:
            self.do_help('set_log_file')
936632
def setVerbosity(self, value):
        
        self._verbosity = value
        for layer in self.layers:
            layer._verbosity = value
328541
def mkdir(self, target_folder):
        
        self.printv("Making directory: %s" % target_folder)
        self.k.key = re.sub(r"^/|/$", "", target_folder) + "/"
        self.k.set_contents_from_string('')
        self.k.close()
241730
def set_target(self, new_target):
        
        try:
            self.device.target = new_target
            return 'T={}'.format(new_target)
        except RuntimeError:
            return 'err: not idle'
        except ValueError:
            return 'err: not 0<=T<=250'
436845
public void replace(SimpleTest test, Object target) {
    for (int i = 0; i < size; i++)
      if (ranges[i].correspondsTo(test)) {
        ranges[i].target = target;
        return;
      }
    throw new IllegalStateException();
  }
727013
def set_verbosity(args):
    '''
    '''
    level = "INFO"

    if args.debug is True:
        level = "DEBUG"
    elif args.quiet is True:
        level = "QUIET"

    os.environ['MESSAGELEVEL'] = level
    os.putenv('MESSAGELEVEL', level)
    os.environ['SINGULARITY_MESSAGELEVEL'] = level
    os.putenv('SINGULARITY_MESSAGELEVEL', level)
    
    # Import logger to set
    from spython.logger import bot
    bot.debug('Logging level %s' %level)
    import spython

    bot.debug("Singularity Python Version: %s" % spython.__version__)
701819
public static function setup(LoggerInterface $logger, int $verbosity = 1): void
    {
        self::$logger = $logger;
        self::setVerbosity($verbosity);
    }
712592
def set_filename(self, filename):
        
        self.filename = filename
        self.logger = logging.getLogger(filename)
191843
def _setup_resources():
    
    target_procs = 10240
    cur_proc, max_proc = resource.getrlimit(resource.RLIMIT_NPROC)
    target_proc = min(max_proc, target_procs) if max_proc > 0 else target_procs
    resource.setrlimit(resource.RLIMIT_NPROC, (max(cur_proc, target_proc), max_proc))
    cur_hdls, max_hdls = resource.getrlimit(resource.RLIMIT_NOFILE)
    target_hdls = min(max_hdls, target_procs) if max_hdls > 0 else target_procs
    resource.setrlimit(resource.RLIMIT_NOFILE, (max(cur_hdls, target_hdls), max_hdls))
531678
def simple_verbosity_option(logger=None, *names, **kwargs):
    '''
    '''

    if not names:
        names = ['--verbosity', '-v']
    if isinstance(logger, str) and logger.startswith('-'):
        raise ValueError('Since click-log 0.2.0, the first argument must now '
                         'be a logger.')

    kwargs.setdefault('default', 'INFO')
    kwargs.setdefault('metavar', 'LVL')
    kwargs.setdefault('expose_value', False)
    kwargs.setdefault('help', 'Either CRITICAL, ERROR, WARNING, INFO or DEBUG')
    kwargs.setdefault('is_eager', True)

    logger = _normalize_logger(logger)

    def decorator(f):
        def _set_level(ctx, param, value):
            x = getattr(logging, value.upper(), None)
            if x is None:
                raise click.BadParameter(
                    'Must be CRITICAL, ERROR, WARNING, INFO or DEBUG, not {}'
                )
            logger.setLevel(x)

        return click.option(*names, callback=_set_level, **kwargs)(f)
    return decorator
251105
def setup_logging(verbosity, filename=None):
    """"""
    levels = [logging.WARNING, logging.INFO, logging.DEBUG]
    level = levels[min(verbosity, len(levels) - 1)]
    logging.root.setLevel(level)

    fmt = logging.Formatter('%(asctime)s %(levelname)-12s %(message)-100s '
                            '[%(filename)s:%(lineno)d]')
    hdlr = logging.StreamHandler()  # stderr
    hdlr.setFormatter(fmt)
    logging.root.addHandler(hdlr)

    if filename:
        hdlr = logging.FileHandler(filename, 'a')
        hdlr.setFormatter(fmt)
        logging.root.addHandler(hdlr)
494344
def setup_logger(verbose, logfile):
    
    level = logging.WARNING
    if verbose == 1:
        level = logging.INFO
    elif verbose > 1:
        level = logging.DEBUG
    if logfile:
        logging.basicConfig(filename=logfile, level=level, format=LOGGING_FORMAT)
    else:
        logging.basicConfig(level=level, format=LOGGING_FORMAT)
427572
def setup(self, target=None, strict=False, minify=False, line_numbers=False, keep_lines=False, no_tco=False):
        """"""
        if target is None:
            target = ""
        else:
            target = str(target).replace(".", "")
        if target in pseudo_targets:
            target = pseudo_targets[target]
        if target not in targets:
            raise CoconutException(
                "unsupported target Python version " + ascii(target),
                extra="supported targets are " + ', '.join(ascii(t) for t in specific_targets) + ", or leave blank for universal",
            )
        logger.log_vars("Compiler args:", locals())
        self.target, self.strict, self.minify, self.line_numbers, self.keep_lines, self.no_tco = (
            target, strict, minify, line_numbers, keep_lines, no_tco,
        )
755725
def modify_macho_file_headers(macho_file_path, modificator_func):
	
	if not os.path.isfile(macho_file_path):
		raise Exception("You must specify a real executable path as a target")
		return False
		
	m = MachO(macho_file_path)
	apply_to_headers(m, modificator_func)
	save_macho(m, macho_file_path)
	return True
183285
def mark_targets_as_explicit (self, target_names):
        """"""

        # Record the name of the target, not instance, since this
        # rule is called before main target instaces are created.
        assert is_iterable_typed(target_names, basestring)
        self.explicit_targets_.update(target_names)
1028871
def configure_logging(verbosity):
    ''''''
    log_level = max(logging.DEBUG, logging.WARNING - logging.DEBUG*verbosity)
    logging.basicConfig(
        stream=sys.stderr, level=log_level,
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    )

    urllib3_logger = logging.getLogger(
        'requests.packages.urllib3')
    urllib3_logger.setLevel(log_level)

    # if debug level set then its nice to see the headers of the request
    if log_level == logging.DEBUG:
        try:
            import http.client as http_client
        except ImportError:
            # Python 2
            import httplib as http_client
        http_client.HTTPConnection.debuglevel = 1