Sets the default handlers options

@inner
@alias module:handler.setOptions

@param {Object} cfg The configuration object {defaults}
961250
function setOptions(cfg = {}) {
    console.log('setting handler options...', cfg);
    // override the default options
    _.defaultsDeep(handlers, cfg.handlers);
}
914398
def configure(options, cfg)
      cfg = super(options, cfg)
      cfg[:offline_queueing] = options[:offline_queueing]
      cfg[:filter_params] = options[:filter_params]
      cfg
    end
249127
function (config) {
        //Default values
        this.started = false;
        this.onStart = core.FUNCTION_VOID;
        this.onStop = core.FUNCTION_VOID;
        this.errorHandlers = [];

        //Configure
        this.configure(config);
    }
815826
def __create_handler_settings(config):
    
    server_config = config['conf']['server']
    plugins_conf = config['conf']['plugins_enabled']

    api_handler_settings = {
        'auth_required': server_config.get('auth_required', True),
        'upstream_timeout': server_config.get('upstream_timeout', None),
        'registry': PluginBuilder.build_plugins(plugins_conf),
    }
    if api_handler_settings['auth_required']:
        api_handler_settings['auth_tokens'] = server_config['auth_tokens']

    return {
        APIHandler: api_handler_settings
    }
526916
public static void configureDefaultHandler (int maxRepeat)
    {
        Logger logger = LogManager.getLogManager().getLogger("");
        Handler[] handlers = logger.getHandlers();
        RepeatRecordFilter filter = new RepeatRecordFilter(maxRepeat);
        for (int ii = 0; ii < handlers.length; ii++) {
            handlers[ii].setFilter(filter);
        }
    }
1175788
@SuppressWarnings("unchecked")
  public static void setDefaultHandlerVisualizer() {
    defaultHandlers = new ArrayList<>(1);
    Class<? extends ResultHandler> clz;
    try {
      clz = (Class<? extends ResultHandler>) Thread.currentThread().getContextClassLoader().loadClass(//
          "de.lmu.ifi.dbs.elki.result.AutomaticVisualization");
    }
    catch(ClassNotFoundException e) {
      clz = ResultWriter.class;
    }
    defaultHandlers.add(clz);
  }
908155
function (cfg) {
                var self = this, current;
                if (!('h' in cfg && 's' in cfg && 'v' in cfg)) {
                    current = self.getHSV();
                    util.each([
                        'h',
                        's',
                        'v'
                    ], function (x) {
                        if (x in cfg) {
                            current[x] = cfg[x];
                        }
                    });
                    cfg = current;
                }
                self.set(hsv2rgb(cfg));
            }
526334
def cfg_(self,cfg=None):
        
        if cfg is None:
            cfg = self._cfg
        else:
            self._cfg = cfg
        self.overlay_load()
        return cfg
1217120
def configure_logging(cfg, custom_level=None):
    """"""
    import itertools as it
    import operator as op

    if custom_level is None:
        custom_level = logging.WARNING
    for entity in it.chain.from_iterable(it.imap(op.methodcaller('viewvalues'),
                                                 [cfg] + [cfg.get(k, dict()) for k in ['handlers', 'loggers']])):
        if isinstance(entity, Mapping) and entity.get('level') == 'custom':
            entity['level'] = custom_level
    logging.config.dictConfig(cfg)
    logging.captureWarnings(cfg.warnings)
177183
def __set_config(self, cfg_section):
		
		defaults = [
			'shutit.core.alerting.emailer.mailto', None,
			'shutit.core.alerting.emailer.mailfrom', 'angry@shutit.tk',
			'shutit.core.alerting.emailer.smtp_server', 'localhost',
			'shutit.core.alerting.emailer.smtp_port', 25,
			'shutit.core.alerting.emailer.use_tls', True,
			'shutit.core.alerting.emailer.send_mail', True,
			'shutit.core.alerting.emailer.subject', 'Shutit Report',
			'shutit.core.alerting.emailer.signature', '--Angry Shutit',
			'shutit.core.alerting.emailer.compress', True,
			'shutit.core.alerting.emailer.username', '',
			'shutit.core.alerting.emailer.password', '',
			'shutit.core.alerting.emailer.safe_mode', True,
			'shutit.core.alerting.emailer.maintainer','',
			'shutit.core.alerting.emailer.mailto_maintainer', True
		]

		for cfg_name, cfg_default in zip(defaults[0::2], defaults[1::2]):
			try:
				self.config[cfg_name] = self.shutit.cfg[cfg_section][cfg_name]
			except KeyError:
				if cfg_default is None:
					raise Exception(cfg_section + ' ' + cfg_name + ' must be set')
				else:
					self.config[cfg_name] = cfg_default

		# only send a mail to the module's maintainer if configured correctly
		if self.config['shutit.core.alerting.emailer.mailto_maintainer'] and \
			(self.config['shutit.core.alerting.emailer.maintainer'] == "" or \
			self.config['shutit.core.alerting.emailer.maintainer'] == self.config['shutit.core.alerting.emailer.mailto']):
			self.config['shutit.core.alerting.emailer.mailto_maintainer'] = False
			self.config['shutit.core.alerting.emailer.maintainer'] = ""
447935
public static void replaceDefaultHandler(Handler handler) {
    Logger rootlogger = LogManager.getLogManager().getLogger("");
    for(Handler h : rootlogger.getHandlers()) {
      if(h instanceof CLISmartHandler) {
        rootlogger.removeHandler(h);
      }
    }
    addHandler(handler);
  }
529819
function(_default, options) {
			if(typeof _default !== "object") {
				_default = {};
			}
			if(typeof options !== "object") {
				options = {};
			}
			this.setOptions($.extend(true, {}, _default, options));
		}
648591
function( cfg, fn ){

            var self = this;

            if ( Physics.util.isFunction( cfg ) || Physics.util.isArray( cfg ) ){
                fn = cfg;
                cfg = {};
            }

            this._meta = {
               // statistics (fps, etc)
               fps: 0,
               ipf: 0
            };
            this._bodies = [];
            this._behaviors = [];
            this._integrator = null;
            this._renderer = null;
            this._paused = false;
            this._warp = 1;
            this._time = 0;

            // set options
            this.options = Physics.util.options( defaults );
            this.options.onChange(function( opts ){

                // set timestep
                self.timestep( opts.timestep );
            });
            this.options( cfg );

            // add integrator
            this.add(Physics.integrator( this.options.integrator ));

            // apply the callback function
            if ( Physics.util.isFunction( fn ) ){

                execCallbacks([ fn ], this, [this, Physics] );

            } else if ( Physics.util.isArray( fn ) ){

                execCallbacks(fn, this, [this, Physics] );
            }
        }
795277
function (cfg, ctxt) {
        this.$Widget.constructor.apply(this, arguments);

        if (ariaUtilsType.isString(cfg.ellipsis)) {
            this._activateEllipsis = true;
            this._directInit = true;
        }

        this._defaultMargin = 0;
    }
1088759
function handleConfigObject(oCfg, mHandlers) {

		function processConfig(key, value) {
			var handler = mHandlers[key];
			if ( typeof handler === 'function' ) {
				if ( handler.length === 1) {
					handler(value);
				} else if ( value != null ) {
					forEach(value, handler);
				}
			} else {
				log.warning("configuration option " + key + " not supported (ignored)");
			}
		}

		// Make sure the 'baseUrl' handler is called first as
		// other handlers (e.g. paths) depend on it
		if (oCfg.baseUrl) {
			processConfig("baseUrl", oCfg.baseUrl);
		}

		forEach(oCfg, function(key, value) {
			// Ignore "baseUrl" here as it will be handled above
			if (key !== "baseUrl") {
				processConfig(key, value);
			}
		});
	}
1226915
function(options) {
        options = options || {};
        options.handlerOptions = options.handlerOptions || this.defaultHandlerOptions;
        OpenLayers.Control.prototype.initialize.apply(this, [options]);
        this.resetHandler();
    }
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }