Configures this logger.

@param {Object} options
438765
function(options)
    {
      var localIncludeTimestamp;
      var localBufferMaxLength;
      var localMessageMaxLength;
      var localLevel;

      // if an options argument is specified
      if (Util.exists(options))
      {
        // make sure it's an object
        Errors.assertInternal(Util.isObject(options));

        localIncludeTimestamp = options.includeTimestamp;
        localBufferMaxLength = options.bufferMaxLength;
        localMessageMaxLength = options.messageMaxLength;
        localLevel = options.level;
      }

      // if an includeTimestamp options is specified, convert it to a boolean
      if (Util.exists(localIncludeTimestamp))
      {
        includeTimestamp = !!localIncludeTimestamp;
      }
      else if (!Util.exists(includeTimestamp))
      {
        // default to true
        includeTimestamp = true;
      }

      // if a bufferMaxLength option is specified, make sure
      // it's a positive integer before updating the logger option
      if (Util.exists(localBufferMaxLength))
      {
        Errors.assertInternal(
            Util.number.isPositiveInteger(localBufferMaxLength));
        bufferMaxLength = localBufferMaxLength;
      }
      // initialize logger option if configure() hasn't been called before
      else if (!Util.exists(bufferMaxLength))
      {
        bufferMaxLength = DEFAULT_BUFFER_MAX_LENGTH;
      }

      // if a messageMaxLength option is specified, make sure
      // it's a positive integer before updating the logger option
      if (Util.exists(localMessageMaxLength))
      {
        Errors.assertInternal(
            Util.number.isPositiveInteger(localMessageMaxLength));
        messageMaxLength = localMessageMaxLength;
      }
      // initialize logger option if configure() hasn't been called before
      else if (!Util.exists(messageMaxLength))
      {
        messageMaxLength = DEFAULT_MESSAGE_MAX_LENGTH;
      }

      // if a level option is specified, make sure
      // it's valid before updating the logger option
      if (Util.exists(localLevel))
      {
        Errors.assertInternal(
            MAP_LOG_LEVEL_TO_OBJECT.hasOwnProperty(localLevel));
        currlevelObject = MAP_LOG_LEVEL_TO_OBJECT[localLevel];
      }
      // initialize logger option if configure() hasn't been called before
      else if (!Util.exists(currlevelObject))
      {
        currlevelObject = DEFAULT_LEVEL;
      }
    }
303966
def _configure_logging(self):
        
        if not self.LOGGING_CONFIG:
            #Fallback to default logging in global settings if needed
            dictConfig(self.DEFAULT_LOGGING)
        else:
            dictConfig(self.LOGGING_CONFIG)
670969
function setup(options) {
        const config = Object.assign({}, DEFAULT_CONFIG, options);

        const $slider = config.$el;
        const $track = $slider.querySelector('.slider-track');
        const $after = $slider.querySelector('.slider-after-image');

        // Copy styles.
        $slider.style.width = getComputedStyle($after).getPropertyValue('width');
        $slider.style.height = getComputedStyle($after).getPropertyValue('height');

        $track.addEventListener('input', (evt) => {
            const percent = Number(evt.target.value);
            $after.style.width = `${percent}%`;
        });

        $track.value = config.defaultValue;
        $track.dispatchEvent(new Event('input'));
    }
46053
def configure(conf, default_config=None):
    
    if conf.logconfig and os.path.isfile(conf.logconfig):
        logging.config.fileConfig(conf.logconfig,
                                  disable_existing_loggers=False)
    elif default_config and os.path.isfile(default_config):
        logging.config.fileConfig(default_config,
                                  disable_existing_loggers=False)
    else:
        init_console_logging(conf)
627166
function() {
  var app = this;
  if (typeof app.config.logger == 'function') {
    app.config.logger(app);
  } else {
    var defaults = {
      name: app.settings.shortname || app.settings.name || app.settings.title || 'base',
      level: 'info'
    };
    var opts = app.config.logger && app.config.logger.options
                ? _.defaults({}, app.config.logger.options, defaults): defaults;
    if (app.config.logger && app.config.logger.type === 'bunyan') {
      var bunyan = require('bunyan');
      app.log.logger = bunyan.createLogger(opts);
    } else {
      app.log.logger = new log.SimpleLogger(opts);
    }
  }
}
923841
def configure(logdir, flush_secs=2):
    
    global _default_logger
    if _default_logger is not None:
        raise ValueError('default logger already configured')
    _default_logger = Logger(logdir, flush_secs=flush_secs)
529819
function(_default, options) {
			if(typeof _default !== "object") {
				_default = {};
			}
			if(typeof options !== "object") {
				options = {};
			}
			this.setOptions($.extend(true, {}, _default, options));
		}
1314074
@Override
	public void configure(final LoggerContext loggerContext) {
		addInfo("Setting up custom configuration.");
		final LoggerContext context = (LoggerContext) StaticLoggerBinder.getSingleton().getLoggerFactory();
		final JoranConfigurator jc = new JoranConfigurator();
		jc.setContext(context);
		context.reset();
		context.putProperty("application-name", appName);
		openStream(jc);
	}
516306
function(options)
    {
      var logTag = options.logLevel;
      if (Util.exists(logTag))
      {
        // check that the specified value is a valid tag
        Errors.checkArgumentValid(LoggerCore.isValidLogTag(logTag),
            ErrorCodes.ERR_GLOGAL_CONFIGURE_INVALID_LOG_LEVEL);

        Logger.getInstance().configure(
        {
          level: LoggerCore.logTagToLevel(logTag)
        });
      }

      var insecureConnect = options.insecureConnect;
      if (Util.exists(insecureConnect))
      {
        // check that the specified value is a boolean
        Errors.checkArgumentValid(Util.isBoolean(insecureConnect),
            ErrorCodes.ERR_GLOBAL_CONFIGURE_INVALID_INSECURE_CONNECT);

        GlobalConfig.setInsecureConnect(insecureConnect);
      }
    }
1005650
function ConfigLoader(strategies, logger) {
  this.strategies = [];

  if (logger) {
    if (typeof logger.debug !== 'function') {
      throw new Error('Provided logger is required to have method debug().');
    }
    this.logger = logger;
  }

  if (strategies && !(strategies instanceof Array)) {
    throw new Error('Argument \'strategies\' must be an array.');
  }

  for (var i = 0; i < strategies.length; i++) {
    this.add(strategies[i]);
  }
}
675692
public static synchronized void configure(final String options,
			final Instrumentation instrumentation) throws Exception {

		if (SigarAgent.instrumentation != null) {
			logger.severe("Duplicate agent setup attempt.");
			return;
		}

		SigarAgent.options = options;
		SigarAgent.instrumentation = instrumentation;

		logger.info("Sigar loader options: " + options);

		final File folder = new File(SigarProvisioner.discoverLocation(options));

		SigarProvisioner.provision(folder);

	}
200339
function initLogging (config) {
    // only create logger if custom logging enabled
    if (config.logger !== true) {
        return
    }
    // create new logger instance
    var logger = new winston.Logger()
    // add transport
    logger.add(winston.transports.Console, {
        formatter: winstonFormatter,
        level: 'info'
    });
    // make logger accessible
    config.logger = logger
    // override console.log function
    console.log = function () {
        logger.info.apply(logger, formatArgs(arguments))
    }
    // override console.info function
    console.info = function () {
        logger.info.apply(logger, formatArgs(arguments))
    }
    // override console.warn function
    console.warn = function () {
        logger.warn.apply(logger, formatArgs(arguments))
    }
    // override console.error function
    console.error = function () {
        logger.error.apply(logger, formatArgs(arguments))
    }
    // override console.debug function
    console.debug = function () {
        logger.debug.apply(logger, formatArgs(arguments))
    }
}
247301
public static void configureLogging() {
		// Create the appender that will write log messages to the console.
		ConsoleAppender consoleAppender = new ConsoleAppender();
		// Define the pattern of log messages.
		// Insert the string "%c{1}:%L" to also show class name and line.
		String pattern = "%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n";
		consoleAppender.setLayout(new PatternLayout(pattern));
		// Change to Level.ERROR for fewer messages:
		consoleAppender.setThreshold(Level.INFO);

		consoleAppender.activateOptions();
		Logger.getRootLogger().addAppender(consoleAppender);
	}
1348047
function configure(loggers, logDir) {
    var msgLogger;
    var logLevel;
    logLevel = winston.level;

    // ServerNode.
    loggers.add('servernode', {
        console: {
            level: logLevel,
            colorize: true
        },
        file: {
            level: logLevel,
            timestamp: true,
            filename: path.join(logDir, 'servernode.log'),
            maxsize: 1000000,
            maxFiles: 10
        }
    });

    // Channel.
    loggers.add('channel', {
        console: {
            level: logLevel,
            colorize: true,
        },
        file: {
            level: logLevel,
            timestamp: true,
            filename: path.join(logDir, 'channels.log'),
            maxsize: 1000000,
            maxFiles: 10
        }
    });

    // Messages.
    // Make custom levels and only File transports for messages.
    msgLogger = loggers.add('messages');
    msgLogger.remove(winston.transports.Console);
    msgLogger.add(winston.transports.File, {
        timestamp: true,
        maxsize: 1000000,
        filename: path.join(logDir, 'messages.log')
    });

    // Do not change, or logging might be affected.
    // Logger.js hardcodes the values for speed.
    msgLogger.setLevels({
        // Log none.
        none: 0,
        // All DATA msgs.
        data: 1,
        // All SET and DATA msgs.
        set: 3,
        // All SET, GET and DATA msgs.
        get: 5,
        // All SETUP, SET, GET and DATA msgs.
        setup: 7,
        // All messages, but **not** PLAYER_UPDATE, SERVERCOMMAND and ALERT.
        game: 9,
        // All messages.
        all: 11
    });

    // Set default logging level for messages.
    msgLogger.level = 'all';

    // Clients.
    loggers.add('clients', {
        console: {
            level: logLevel,
            colorize: true,
        },
        file: {
            level: 'silly',
            timestamp: true,
            filename: path.join(logDir, 'clients.log')
        }
    });

    return true;
}
947469
def _configure_logger(fmt, quiet, level, fpath,
    pre_hooks, post_hooks, metric_grouping_interval):
    

    # NOTE not thread safe. Multiple BaseScripts cannot be instantiated concurrently.
    level = getattr(logging, level.upper())

    global _GLOBAL_LOG_CONFIGURED
    if _GLOBAL_LOG_CONFIGURED:
        return

    # since the hooks need to run through structlog, need to wrap them like processors
    def wrap_hook(fn):
        @wraps(fn)
        def processor(logger, method_name, event_dict):
            fn(event_dict)
            return event_dict

        return processor

    processors = define_log_processors()
    processors.extend(
        [ wrap_hook(h) for h in pre_hooks ]
    )
    if metric_grouping_interval:
        processors.append(metrics_grouping_processor)

    log_renderer = define_log_renderer(fmt, fpath, quiet)
    stderr_required = (not quiet)
    pretty_to_stderr = (
        stderr_required
        and (
            fmt == "pretty"
            or (fmt is None and sys.stderr.isatty())
        )
    )

    should_inject_pretty_renderer = (
        pretty_to_stderr
        and not isinstance(log_renderer, structlog.dev.ConsoleRenderer)
    )
    if should_inject_pretty_renderer:
        stderr_required = False
        processors.append(StderrConsoleRenderer())

    processors.append(log_renderer)
    processors.extend(
        [ wrap_hook(h) for h in post_hooks ]
    )

    streams = []
    # we need to use a stream if we are writing to both file and stderr, and both are json
    if stderr_required:
        streams.append(sys.stderr)

    if fpath is not None:
        # TODO handle creating a directory for this log file ?
        # TODO set mode and encoding appropriately
        streams.append(open(fpath, 'a'))

    assert len(streams) != 0, "cannot configure logger for 0 streams"

    stream = streams[0] if len(streams) == 1 else Stream(*streams)
    atexit.register(stream.close)

    # a global level struct log config unless otherwise specified.
    structlog.configure(
        processors=processors,
        context_class=dict,
        logger_factory=LevelLoggerFactory(stream, level=level),
        wrapper_class=BoundLevelLogger,
        cache_logger_on_first_use=True,
    )

    # TODO take care of removing other handlers
    stdlib_root_log = logging.getLogger()
    stdlib_root_log.addHandler(StdlibStructlogHandler())
    stdlib_root_log.setLevel(level)

    _GLOBAL_LOG_CONFIGURED = True
311920
function(options) {

   	/**
   	 * Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.
   	 */
   	this.options = {};
   	
   	// Basic options
   	this.options.name = options.name;
   	this.options.value = options.value;
   	this.options.id = options.id || Dom.generateId();
   	this.options.label = options.label;
   	this.options.description = options.description;
   
      // Define default messages
	   this.options.messages = {};
	   this.options.messages.required = (options.messages && options.messages.required) ? options.messages.required : inputEx.messages.required;
	   this.options.messages.invalid = (options.messages && options.messages.invalid) ? options.messages.invalid : inputEx.messages.invalid;
	   //this.options.messages.valid = (options.messages && options.messages.valid) ? options.messages.valid : inputEx.messages.valid;
	
	   // Other options
	   this.options.className = options.className ? options.className : 'inputEx-Field';
	   this.options.required = lang.isUndefined(options.required) ? false : options.required;
	   this.options.showMsg = lang.isUndefined(options.showMsg) ? false : options.showMsg;
	}
1268689
def configure_logging(debug=False):
    
    if not debug:
        logging.basicConfig(level=logging.INFO,
                            format=LOG_FORMAT)
    else:
        logging.basicConfig(level=logging.DEBUG,
                            format=DEBUG_LOG_FORMAT)