Logs +req+ and +res+ in the access logs.  +config+ is used for the
 server name.
979793
def access_log(config, req, res)
      param = AccessLog::setup_params(config, req, res)
      @config[:AccessLog].each{|logger, fmt|
        logger << AccessLog::format(fmt+"\n", param)
      }
    end
1268301
private void parseAccessLog(Map<String, Object> config) {
        String filename = (String) config.get("access.filePath");
        if (null == filename || 0 == filename.trim().length()) {
            return;
        }
        try {
            this.ncsaLog = new AccessLogger(filename.trim());
        } catch (Throwable t) {
            FFDCFilter.processException(t, getClass().getName() + ".parseAccessLog", "1", this);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Logging service was unable to open a file: " + filename + "; " + t);
            }
            return;
        }

        // save the NCSA format value
        String format = (String) config.get("access.logFormat");
        this.ncsaLog.setFormat(LogUtils.convertNCSAFormat(format));

        // now check for the maximum file size
        String size = (String) config.get("access.maximumSize");
        if (null != size) {
            // convert from MB to bytes
            if (!this.ncsaLog.setMaximumSize(convertInt(size, 0) * 1048576L)) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Logging service has invalid access log size: " + size);
                }
            }
        }

        // check for the max backup files
        String backups = (String) config.get("access.maximumBackupFiles");
        if (null != backups) {
            this.ncsaLog.setMaximumBackupFiles(convertInt(backups, 1));
        }

    }
1307215
private void logScanInfo() {
        StringBuilder strBuilder = new StringBuilder(150);
        if (nodeInScopeCount != 0) {
            strBuilder.append("Scanning ");
            strBuilder.append(nodeInScopeCount);
            strBuilder.append(" node(s) ");
        } else {
            strBuilder.append("No nodes to scan ");
        }
        if (parentScanner.getJustScanInScope()) {
            strBuilder.append("[just in scope] ");
        }
        strBuilder.append("from ").append(hostAndPort);
        if (user != null) {
            strBuilder.append(" as ");
            strBuilder.append(user.getName());
        }
        if (nodeInScopeCount == 0) {
            strBuilder.append(", skipping all plugins.");
        }
        log.info(strBuilder.toString());
    }
527984
def resque_server
      u = self
      servers = Jobtracker.deploy_servers
      server_i = u.name.to_md5.gsub(/[^0-9]/,'').to_i % servers.length
      servers[server_i]
    end
1196686
def config_changed?(name)
      logger.debug "config_changed?(#{name.inspect})"
      name = name.to_s
      !(self.cache_files[name] === get_config_files(name))
    end
29818
function logRequest(req, res) {
    var session = req.session;
    if (!session) return res.send( { noSession:1 } );

    // start by logging all query params
    var entry = u.clone(req.query || {});

    entry[sessionOpts.logTime || 't'] =
      session.ts ? (Date.now() - session.ts) / 1000 | 0 : 0;

    entry[sessionOpts.logPath || 'p'] = req.path;

    if (!session.log) {
      session.log = [];
      session.ts = Date.now();
      if (req.get('user-agent')) { session.ua = req.get('user-agent'); }
    }

    var n = session.log.push(entry);
    res.send( { n:n } );
  }
810102
function logSetup() {
    JuttleLogger.getLogger = log4js.getLogger;

    let levels = {
        '[all]': 'info'
    };

    // Handle node.js style debug configuration where DEBUG is a
    // comma-separated list of debug targets, or '*' to enable all
    // debugging.
    let DEBUG = process.env.DEBUG;
    if (DEBUG) {
        let targets = DEBUG.split(',');
        _.each(targets, function(target) {
            if (target === '*') { target = '[all]'; }
            levels[target] = 'debug';
        });
    }

    log4js.configure({
        levels: levels,
        appenders: [{type: __dirname + '/stderr-appender'}]
    });

    JuttleLogger.getLogger('cli').debug('set logging levels to', levels);
}
226577
function (latest_log) {
		if (latest_log !== null && latest_log.type !== "SYSTEM_DOWN") {
			LOG.warn("server crashed last time", 'handlers.system');
			LOG.event("SYSTEM_CRASHED", SR.Settings.SERVER_INFO);
		}

		LOG.event("SYSTEM_UP", SR.Settings.SERVER_INFO);
	}
949389
def config_server
      file = File.open("#{@project_name}/server.rb", "r+")
      file.each do |line|	   
        while line == "  def response(env)\n" do
          pos = file.pos
          rest = file.read
          file.seek pos
          file.write("\t::") 
          file.write(@module_name)
          file.write("::Base.call(env)\n")
          file.write(rest)
          $stdout.puts "\e[1;35m \tconfig\e[0m\tserver.rb"
          return
        end
      end
    end
289438
def log_configs(self):
        """"""
        for sec in self.config.sections():
            LOG.debug('   %s: %s', sec, self.config.options(sec))
645863
def config_logging(args):
    '''  '''
    if args.quiet:
        logging.getLogger().setLevel(logging.CRITICAL)
    elif args.verbose:
        logging.getLogger().setLevel(logging.DEBUG)
778489
function loadConfig() {
  underload('whitelist', 'whitelist.file');

  if (!program['bower'] && config.has('packages.type') && config.get('packages.type') == 'bower') {
    program['bower'] = true;
  }

  if (!program['noNode'] && config.has('packages.withNode') && config.get('packages.withNode') == false) {
    program['noNode'] = true;
  }

  underload('package', 'packages.file');

  underload('level', 'logging.level');
  underload('quiet', 'logging.quiet');
  underload('verbose', 'logging.verbose');

  underload('scheme', 'server.scheme');
  underload('host', 'server.host');
  underload('port', 'server.port');

  underload('cacheDir', 'cache.path');

  underload('cacheTimeout', 'cache.timeout')

  underload('username', 'auth.user');
  underload('token', 'auth.token');
}
306080
def setup_extended_logging(opts):
    '''
    
    '''
    if is_extended_logging_configured() is True:
        # Don't re-configure external loggers
        return

    # Explicit late import of salt's loader
    import salt.loader

    # Let's keep a reference to the current logging handlers
    initial_handlers = logging.root.handlers[:]

    # Load any additional logging handlers
    providers = salt.loader.log_handlers(opts)

    # Let's keep track of the new logging handlers so we can sync the stored
    # log records with them
    additional_handlers = []

    for name, get_handlers_func in six.iteritems(providers):
        logging.getLogger(__name__).info('Processing `log_handlers.%s`', name)
        # Keep a reference to the logging handlers count before getting the
        # possible additional ones.
        initial_handlers_count = len(logging.root.handlers)

        handlers = get_handlers_func()
        if isinstance(handlers, types.GeneratorType):
            handlers = list(handlers)
        elif handlers is False or handlers == [False]:
            # A false return value means not configuring any logging handler on
            # purpose
            logging.getLogger(__name__).info(
                'The `log_handlers.%s.setup_handlers()` function returned '
                '`False` which means no logging handler was configured on '
                'purpose. Continuing...', name
            )
            continue
        else:
            # Make sure we have an iterable
            handlers = [handlers]

        for handler in handlers:
            if not handler and \
                    len(logging.root.handlers) == initial_handlers_count:
                logging.getLogger(__name__).info(
                    'The `log_handlers.%s`, did not return any handlers '
                    'and the global handlers count did not increase. This '
                    'could be a sign of `log_handlers.%s` not working as '
                    'supposed', name, name
                )
                continue

            logging.getLogger(__name__).debug(
                'Adding the \'%s\' provided logging handler: \'%s\'',
                name, handler
            )
            additional_handlers.append(handler)
            logging.root.addHandler(handler)

    for handler in logging.root.handlers:
        if handler in initial_handlers:
            continue
        additional_handlers.append(handler)

    # Sync the null logging handler messages with the temporary handler
    if LOGGING_STORE_HANDLER is not None:
        LOGGING_STORE_HANDLER.sync_with_handlers(additional_handlers)
    else:
        logging.getLogger(__name__).debug(
            'LOGGING_STORE_HANDLER is already None, can\'t sync messages '
            'with it'
        )

    # Remove the temporary queue logging handler
    __remove_queue_logging_handler()

    # Remove the temporary null logging handler (if it exists)
    __remove_null_logging_handler()

    global __EXTERNAL_LOGGERS_CONFIGURED
    __EXTERNAL_LOGGERS_CONFIGURED = True
611709
def log_config():
    """"""
    conf = '\n'.join(
            ['{}="{}"'.format(k, v) for k, v
             in sorted(options.as_dict().iteritems())])
    logging.info('Service started with the following settings:\n' + conf)
681812
def get_log_config(component, handlers, level='DEBUG', path='/var/log/vfine/'):
    """"""
    config = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'standard': {
                'format': '%(asctime)s [%(levelname)s][%(threadName)s]' +
                          '[%(name)s.%(funcName)s():%(lineno)d] %(message)s'
            },
            'color': {
                '()': 'shaw.log.SplitColoredFormatter',
                'format': "%(asctime)s " +
                          "%(log_color)s%(bold)s[%(levelname)s]%(reset)s" +
                          "[%(threadName)s][%(name)s.%(funcName)s():%(lineno)d] " +
                          "%(blue)s%(message)s"
            }
        },
        'handlers': {
            'debug': {
                'level': 'DEBUG',
                'class': 'logging.handlers.RotatingFileHandler',
                'filename': path + component + '.debug.log',
                'maxBytes': 1024 * 1024 * 1024,
                'backupCount': 5,
                'formatter': 'standard',
            },
            'color': {
                'level': 'DEBUG',
                'class': 'logging.handlers.RotatingFileHandler',
                'filename': path + component + '.color.log',
                'maxBytes': 1024 * 1024 * 1024,
                'backupCount': 5,
                'formatter': 'color',
            },
            'info': {
                'level': 'INFO',
                'class': 'logging.handlers.RotatingFileHandler',
                'filename': path + component + '.info.log',
                'maxBytes': 1024 * 1024 * 1024,
                'backupCount': 5,
                'formatter': 'standard',
            },
            'error': {
                'level': 'ERROR',
                'class': 'logging.handlers.RotatingFileHandler',
                'filename': path + component + '.error.log',
                'maxBytes': 1024 * 1024 * 100,
                'backupCount': 5,
                'formatter': 'standard',
            },
            'console': {
                'level': level,
                'class': 'logging.StreamHandler',
                'formatter': 'standard'
            },
        },
        'loggers': {
            'django': {
                'handlers': handlers,
                'level': 'INFO',
                'propagate': False
            },
            'django.request': {
                'handlers': handlers,
                'level': 'INFO',
                'propagate': False,
            },
            '': {
                'handlers': handlers,
                'level': level,
                'propagate': False
            },
        }
    }
    return config
445651
private void fixLogging(BimServerConfig config) throws IOException {
		Path logFolder = config.getHomeDir().resolve("logs");
		if (!Files.isDirectory(logFolder)) {
			Files.createDirectories(logFolder);
		}
		Path file = logFolder.resolve("bimserver.log");

		LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
		PatternLayoutEncoder ple = new PatternLayoutEncoder();

		ple.setPattern("%date %level [%thread] %logger{10} [%file:%line] %msg%n");
		ple.setContext(lc);
		ple.start();
		FileAppender<ILoggingEvent> fileAppender = new FileAppender<ILoggingEvent>();
		String filename = file.toAbsolutePath().toString();

		if (lc instanceof LoggerContext) {
		    if (!lc.isStarted()) {
		    	lc.start();
		    }
		}
		
		System.out.println("Logging to " + filename);
		
		fileAppender.setFile(filename);
		fileAppender.setEncoder(ple);
		fileAppender.setContext(lc);
		fileAppender.start();

		for (ch.qos.logback.classic.Logger log : lc.getLoggerList()) {
			if (log.getLevel() != null) {
				log.addAppender(fileAppender);
			}
		}
	}
252115
public void configureLogging(LoggingPreferences prefs) {
    if (prefs == null) {
      return;
    }
    if (prefs.getEnabledLogTypes().contains(LogType.SERVER)) {
      serverLogLevel = prefs.getLevel(LogType.SERVER);
    }
  }