Define a handler for a configuration value.
967762
def define_config(name, &blk)
      if @definitions.has_key?(name)
        raise ConfigError.new("#{name.to_s.upcase} is already registered")
      end
      @definitions[name] = Proc.new do |env|
        value = yield env
        if value.kind_of?(Hash)
          value
        else
          {name => value}
        end
      end
    end
825190
def reload_configuration(self, event):
        """"""

        if event.target == self.uniquename:
            self.log('Reloading configuration')
            self._read_config()
1229853
private static function handleConfigArr(&$data, $key, &$value)
    {
        $value = '';
        if (isset($data[$key])) {
            $value = $data[$key];
            unset($data[$key]);
        }
    }
308828
def SetRaw(self, name, value):
    """"""
    if self.writeback is None:
      logging.warning("Attempting to modify a read only config object.")
    if name in self.constants:
      raise ConstModificationError(
          "Attempting to modify constant value %s" % name)

    self.writeback_data[name] = value
    self.FlushCache()
33857
@JsonAnySetter
    public void putConfigurationValue(String key, Object value) {
        this.configuration.put(key, value);
    }
512591
def config_set(self, parameter, value):
        """"""
        if not isinstance(parameter, str):
            raise TypeError("parameter must be str")
        fut = self.execute(b'CONFIG', b'SET', parameter, value)
        return wait_ok(fut)
635101
def process_settings(self, settings):
        """"""
        logging.debug("Using configuration from: %s", settings.name)
        exec(compile(settings.read(), settings.name, 'exec'), globals(), locals())
661770
function(suppliedConfig) {
    // Handle config and defaults
    try {
      config.parseAndUpdate(suppliedConfig);
    } catch (e) {
      render.triggerError(e);
      return this
    }

    utils.logDebug(['Final config:', getConfig()]);

    try {
      return startRender();
    } catch (e) {
      render.triggerError(e);
      return this
    }
  }
357931
def validate_value(config, allowed_values)
      value = instance_variable_get("@#{config}")

      return unless invalid_value?(value, allowed_values)

      message = "Configuration value `#{value}` is not allowed for `#{config}`."
      raise ConfigurationError, message
    end
861681
function(newValue,property,config) {
                var thesetter = config.setter;
                if ( typeof(config.setter) === 'string' ) {
                    record[config.setter](newValue, property, config,record);
                } else {
                    //assume function
                    thesetter.call(record,newValue, property, config,record);
                }

            }
346356
public T withParameter(ConfigurationParameters parameter, Object value) {
        configMap.put(parameter, value);
        return getThis();
    }
703165
def config(key, value, local=True):
    
    option = local and '--local' or ''
    run('config %s "%s" "%s"' % (option, key, value))
691176
def set_config_parameter(self, param, value):
        '''

        '''
        with self._mutex:
            if self._obj.set_configuration(param, value) != RTC.RTC_OK:
                raise exceptions.FailedToSetConfigurationError(param, value)
            # Force a reparse of the configuration
            self._configuration = None
1032229
def configure(self):
        """"""
        if self.debug is not None and not self.debug:
            self._remove_debug_handlers()
        self._remove_debug_only()
        logging.config.dictConfig(self.config)
        try:
            logging.captureWarnings(True)
        except AttributeError:
            pass
1146670
public void initImpl()
    throws ConfigException
  {
    if (_handler != null) {
    }
    else if (_pathHandler != null) {
    }
    else {
      setPath(Paths.get("."));
    }

    /*
    if (_formatter instanceof ELFormatter) {
      ((ELFormatter)_formatter).init();
    }
    */

    if (_formatter != null) {
    }
    else if (_handler != null && _handler.getFormatter() != null) {
    }
    else {
      _formatter = new PatternFormatter(PatternFormatter.DEFAULT_PATTERN);
    }
    
    if (_pathHandler != null) {
      _pathHandler.init();

      _handler = _pathHandler;
    }
    
    if (_handler == null) {
      throw new ConfigException(L.l("<log-handler> requires a configured log handler"));
    }
    
    // env/02s9
    if (_level != null) {
      _handler.setLevel(_level);
    }

    /* JDK defaults to Level.ALL
    if (_level != null)
      _handler.setLevel(_level);
    else
      _handler.setLevel(Level.INFO);
    */

    if (_formatter != null) {
      _handler.setFormatter(_formatter);
    }

    if (_filter != null) {
      _handler.setFilter(_filter);
    }
    
    if (_names.size() == 0) {
      _names.add("");
    }

    for (String name : _names) {
      Logger logger = Logger.getLogger(name);

      if (! (logger instanceof EnvironmentLogger)) {
        if (_handler instanceof AutoCloseable) {
          EnvLoader.addCloseListener((AutoCloseable) _handler);
        }
      }

      logger.addHandler(_handler);
    }
  }
172681
def set_config(self, key, option, value):
        """"""
        if '_config' not in self.proxy:
            newopt = dict(default_cfg)
            newopt[option] = value
            self.proxy['_config'] = {key: newopt}
        else:
            if key in self.proxy['_config']:
                self.proxy['_config'][key][option] = value
            else:
                newopt = dict(default_cfg)
                newopt[option] = value
                self.proxy['_config'][key] = newopt
237166
def set(self, section, option, value=None):
        """"""
        _, option, value = self._validate_value_types(option=option, value=value)
        super(ConfigParser, self).set(section, option, value)