Selectively log an accepted request.
502476
def log_request(self, code='-', size='-'):
        """"""

        if self.server.logRequests:
            BaseHTTPServer.BaseHTTPRequestHandler.log_request(self, code, size)
144002
def on_open(self, info):
        """"""
        # Store some properties
        self.ip = info.ip

        # Create fake request object
        self.request = info

        # Call open
        self.open()
214229
def process_request(self, unused_request):
    """"""
    # Compare to the first half of toplevel() in context.py.
    tasklets._state.clear_all_pending()
    # Create and install a new context.
    ctx = tasklets.make_default_context()
    tasklets.set_context(ctx)
215267
function onWsRequest(request) {
  if (-1 == request.requestedProtocols.indexOf(ragentsServer.wsProtocol)) {
    return request.reject()
  }

  request.accept(ragentsServer.wsProtocol, request.origin)
}
839943
def should_skip_logging(func):
    
    disabled = strtobool(request.headers.get("x-request-nolog", "false"))
    return disabled or getattr(func, SKIP_LOGGING, False)
124269
def process_request(self, request):
        """"""
        assert hasattr(request, 'user')
        if not request.user.is_authenticated():
            path = request.path_info.lstrip('/')
            if not any(m.match(path) for m in EXEMPT_URLS):
                return HttpResponseRedirect(reverse(settings.LOGIN_URL))
111164
def log_start(self, start):
        """"""
        if not logger.isEnabledFor(logging.INFO): return

        try:
            req = self.request

            logger.info("REQUEST {} {}?{}".format(req.method, req.path, req.query))
            logger.info(datetime.datetime.strftime(datetime.datetime.utcnow(), "DATE %Y-%m-%dT%H:%M:%S.%f"))

            ip = req.ip
            if ip:
                logger.info("\tIP ADDRESS: {}".format(ip))

            if 'authorization' in req.headers:
                logger.info('AUTH {}'.format(req.headers['authorization']))

            ignore_hs = set([
                'accept-language',
                'accept-encoding',
                'connection',
                'authorization',
                'host',
                'x-forwarded-for'
            ])
            hs = ["Request Headers..."]
            for k, v in req.headers.items():
                if k not in ignore_hs:
                    hs.append("\t{}: {}".format(k, v))

            logger.info(os.linesep.join(hs))

        except Exception as e:
            logger.warn(e, exc_info=True)
1296928
def _log_tc_proxy(self):
        """"""
        if self.default_args.tc_proxy_tc:
            self.log.info(
                u'Proxy Server (TC): {}:{}.'.format(
                    self.default_args.tc_proxy_host, self.default_args.tc_proxy_port
                )
            )
182093
function( m, opts ) {
        return function( o, cb ) {
            var r = __request.apply( this, arguments );
            m.trigger( "request", m, r, opts );
            return r;
        }
    }
802094
def process_exception(self, request, exception):
        """"""
        log_format = self._get_log_format(request)
        if log_format is None:
            return

        params = self._get_parameters_from_request(request, True)
        params['message'] = exception
        params['http_status'] = '-'

        self.OPERATION_LOG.info(log_format, params)
499904
function log(requester, level) {
    var context = requester.context;
    var logger = context.data.logger;
    if (!logger || !logger[level]) {
        return;
    }

    var args = Array.prototype.slice.call(arguments, 2);
    args[0] = 'AJAX-' + requester.uid + ' ' + args[0];
    logger[level].apply(logger, args);
}
506506
protected void log(HttpServletRequest httpRequest, String requestName, long duration,
			boolean systemError, int responseSize) {
		if (!logEnabled) {
			return;
		}
		final String filterName = filterConfig.getFilterName();
		LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseSize,
				filterName);
	}
278135
def _log(self):
        """"""
        self._log_platform()
        self._log_app_data()
        self._log_python_version()
        self._log_tcex_version()
        self._log_tc_proxy()
1149151
def _ignore_request(self, path):
        """"""
        return any([
            re.match(pattern, path) for pattern in QC_SETTINGS['IGNORE_REQUEST_PATTERNS']
        ])
972191
def _log_request(self, request):
        
        msg = []
        for d in self.LOG_DATA:
            val = getattr(request, d)
            if val:
                msg.append(d + ': ' + repr(val))
        for d in self.LOG_HEADERS:
            if d in request.headers and request.headers[d]:
                msg.append(d + ': ' + repr(request.headers[d]))
        logger.info("Request information: %s", ', '.join(msg))
874549
function mustBeLoggedIn(req, res, next) {
  if (req.session && req.session.user) {
    next();
  }
  else {
    res.status(401).send('You must be logged-in to access this resource');
  }
}
537375
def after_request_log(target_url, opts, response)
      <<-LOG
Finish request #{opts[:method].upcase} #{target_url} with #{response.code}
#{response.body}
      LOG
    end