Convenience function to set a number of parameters on this logger
            and associated handlers and formatters.
768850
def configure(self, **kwargs):
        ''' 
        '''
        for kwarg in kwargs:
            value = kwargs[kwarg]

            if kwarg == 'level':
                self.set_level(value)

            elif kwarg == 'default_level':
                self.default_level = level_map.get(value, value)

            elif kwarg == 'datefmt':
                self.handlers[0].formatter.datefmt = value

            elif kwarg == 'msgfmt':
                self.handlers[0].formatter._style._fmt = value

            elif kwarg == 'stream':
                global fg, fx, _CHOSEN_PALETTE
                self.handlers[0].stream = value
                fg, fx, _CHOSEN_PALETTE = _find_palettes(value)

            elif kwarg == 'theme':
                if type(value) is str:
                    theme = _themes[value]
                    if value == 'plain':
                        fmtr =  logging.Formatter(style='{', **theme)
                    elif value == 'json':
                        fmtr =  _JSONFormatter(**theme)
                    else:
                        fmtr =  _ColorFormatter(tty=_is_a_tty, **theme)
                elif type(value) is dict:
                    if 'style' in value or 'icons' in value:
                        fmtr =  _ColorFormatter(tty=_is_a_tty, **theme)
                    else:
                        fmtr =  logging.Formatter(style='{', **theme)
                self.handlers[0].setFormatter(fmtr)

            elif kwarg == 'icons':
                if type(value) is str:
                    value = _icons[value]
                self.handlers[0].formatter._theme_icons = value

            elif kwarg == 'style':
                if type(value) is str:
                    value = _styles[value]
                self.handlers[0].formatter._theme_style = value

            elif kwarg == 'lexer':
                try:
                    self.handlers[0].formatter.set_lexer(value)
                except AttributeError as err:
                    self.error('lexer: ColorFormatter not available.')
            else:
                raise NameError('unknown keyword argument: %s' % kwarg)
1260612
def setup_parameters(self):
        """"""
        t = self.template
        parameters = self.get_parameter_definitions()

        if not parameters:
            logger.debug("No parameters defined.")
            return

        for name, attrs in parameters.items():
            p = build_parameter(name, attrs)
            t.add_parameter(p)
188347
def set_parameters(self):
        
        for key in dir(self):
            if key.startswith('REQUIRES_'):
                setattr(self, key, getattr(self.gmpe, key))
            if key.startswith('DEFINED_'):
                if not key.endswith('FOR_INTENSITY_MEASURE_TYPES'):
                    setattr(self, key, getattr(self.gmpe, key))
1047265
def add_handler(cls, level, fmt, colorful, **kwargs):
    """"""
    global g_logger
 
    if isinstance(level, str):
        level = getattr(logging, level.upper(), logging.DEBUG)
 
    handler = cls(**kwargs)
    handler.setLevel(level)
 
    if colorful:
        formatter = ColoredFormatter(fmt, datefmt='%Y-%m-%d %H:%M:%S')
    else:
        formatter = logging.Formatter(fmt, datefmt='%Y-%m-%d %H:%M:%S')
 
    handler.setFormatter(formatter)
    g_logger.addHandler(handler)
 
    return handler
150336
public static void configureDefaultHandler (Formatter formatter)
    {
        Logger logger = LogManager.getLogManager().getLogger("");
        for (Handler handler : logger.getHandlers()) {
            handler.setFormatter(formatter);
        }
    }
1289813
public void setLogger(Logger logger) {

		System.out.println("LOGGER set");
//		if(logger instanceof SimpleFileLogger) {
			this.logger = logger;
			System.out.println("appender added");
			this.logger.addAppender(this);
//		}
	}
816613
def init_logger():
    
    formatter = logging.Formatter('%(levelname)s: %(message)s')
    console = logging.StreamHandler(stream=sys.stdout)
    console.setLevel(logging.INFO)
    console.setFormatter(formatter)
    logger.addHandler(console)
462663
def set_parameters(self,parameters):
        
        
        for key,value in list(parameters.items()):
            if key in self.parameters:
                self.parameters[key] = value
366446
public void setParameters(Map<String, String> parameters) {
        if (parameters == null || parameters.isEmpty()) {
            this.parameterItemRuleMap = null;
        } else {
            ItemRuleMap itemRuleMap = new ItemRuleMap();
            for (Map.Entry<String, String> entry : parameters.entrySet()) {
                ItemRule ir = new ItemRule();
                ir.setTokenize(false);
                ir.setName(entry.getKey());
                ir.setValue(entry.getValue());
                itemRuleMap.putItemRule(ir);
            }
            this.parameterItemRuleMap = itemRuleMap;
        }
    }
387499
def set_level_for_logger_and_its_handlers(log: logging.Logger,
                                          level: int) -> None:
    
    log.setLevel(level)
    for h in log.handlers:  # type: logging.Handler
        h.setLevel(level)
250926
def add_params(self, **kw):
        
        for k, v in kw.items():
            if (k not in self.params) and (k not in self.specific_params):
                raise ParameterError('"%s" is not a valid parameter for %s'
                                     % (k, self.__class__.__name__))
            try:
                self.params[k].validate(v)
            except KeyError:
                self.specific_params[k].validate(v)

        self._orig_kwargs.update(kw)
        self.kwargs = self._orig_kwargs.copy()
66704
def setup_logging(options=None):
    """"""
    level = logging.DEBUG if options is not None and options.debug \
        else logging.WARNING
    console = logging.StreamHandler()
    console.setLevel(level)
    formatter = logging.Formatter('%(name)s: %(levelname)-8s %(message)s')
    console.setFormatter(formatter)
    logging.getLogger('parquet').setLevel(level)
    logging.getLogger('parquet').addHandler(console)
461928
def _set_logger(logger_name, level=logging.INFO):
        
        log = logging.getLogger(logger_name)
        log.setLevel(level)

        ch = logging.StreamHandler(None)
        ch.setLevel(level)

        formatter = logging.Formatter(DebugFmtString)

        # add formatter to ch
        ch.setFormatter(formatter)

        # add ch to logger
        log.addHandler(ch)
401565
def _set_parameters(self, parameters):
        """"""
        for theta in self.variables['theta']:
            val = 1.0
            # TODO: improve approach for initializing parameters.
            if parameters is not None:
                if theta.name in parameters:
                    val = parameters[theta.name]
            # Add parameter.
            
            self.link_parameters(Param(theta.name, val, None))
948558
private void initParameters(ProcessingParameters pParams) {
        processingConfig = pParams;
        String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
        if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
            valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
        } else {
            valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
        }
    }
1353334
def configure(level=logging.WARNING, handler=None, formatter=None):
        
        if formatter is None:
            formatter = LogrFormatter()

        if handler is None:
            handler = logging.StreamHandler()

        handler.setFormatter(formatter)
        handler.setLevel(level)
        Logr.handler = handler
183831
def configure_logging(args):
    """"""
    log_format = logging.Formatter('%(levelname)s:%(name)s:line %(lineno)s:%(message)s')
    log_level = logging.INFO if args.verbose else logging.WARN
    log_level = logging.DEBUG if args.debug else log_level
    console = logging.StreamHandler()
    console.setFormatter(log_format)
    console.setLevel(log_level)
    root_logger = logging.getLogger()
    if len(root_logger.handlers) == 0:
        root_logger.addHandler(console)
    root_logger.setLevel(log_level)
    root_logger.handlers[0].setFormatter(log_format)
    logging.getLogger(__name__)