Breadcrummbs when shows request log details
768139
public function onRequestDetails()
    {
        Breadcrumbs::register('logger-request', function($breadcrumbs) {
            $breadcrumbs->push('Request Log', handles('antares::logger/request/index'), ['force_link' => true]);
        });
        $date = Request::route()->parameter('date');
        Breadcrumbs::register('logger-request-' . $date, function($breadcrumbs) use($date) {
            $breadcrumbs->parent('logger-request');
        });
        view()->share('breadcrumbs', Breadcrumbs::render('logger-request-' . $date));
    }
53541
def weird_log_graph(self, stream):
        '''  '''
        weird_log = list(stream)
        print 'Entering weird_log_graph...(%d rows)' % len(weird_log)

        # Here we're just going to capture that something weird
        # happened between two hosts
        weird_pairs = set()
        for row in weird_log:
            weird_pairs.add((row['id.orig_h'], row['id.resp_h']))

        # Okay now make the weird node for each pair
        for pair in weird_pairs:

            # Skip '-' hosts
            if (pair[0] == '-'):
                continue

            # Add the originating host
            self.add_node(pair[0], pair[0], ['host', 'origin'])

            # Add the response host
            self.add_node(pair[1], pair[1], ['host'])

            # Add a weird node
            weird_name = 'weird'+pair[0]+'_'+pair[1]
            self.add_node(weird_name, 'weird', ['weird'])

            # The relationships between the nodes
            self.add_rel(pair[0], weird_name, 'weird')
            self.add_rel(weird_name, pair[1], 'weird')
113456
def logs(self, num=None, source=None, ps=None, tail=False):
        """"""

        # Bootstrap payload package.
        payload = {'logplex': 'true'}

        if num:
            payload['num'] = num

        if source:
            payload['source'] = source

        if ps:
            payload['ps'] = ps

        if tail:
            payload['tail'] = 1

        # Grab the URL of the logplex endpoint.
        r = self._h._http_resource(
            method='GET',
            resource=('apps', self.name, 'logs'),
            data=payload
        )

        # Grab the actual logs.
        r = requests.get(r.content.decode("utf-8"), verify=False, stream=True)

        if not tail:
            return r.content
        else:
            # Return line iterator for tail!
            return r.iter_lines()
500956
def log_request(self, code='-', size='-'):
        #  pylint: disable=unused-argument
        
        self.log('%s: HTTP status %s',
                 (self._get_log_prefix(), code),
                 logging.INFO)
699157
private void logResults() {
    LOG.info("Key Values Processed: " + kvs_processed.get());
    LOG.info("Rows Processed: " + rows_processed.get());
    LOG.info("Valid Datapoints: " + valid_datapoints.get());
    LOG.info("Annotations: " + annotations.get());
    LOG.info("Invalid Row Keys Found: " + bad_key.get());
    LOG.info("Invalid Rows Deleted: " + bad_key_fixed.get());
    LOG.info("Duplicate Datapoints: " + duplicates.get());
    LOG.info("Duplicate Datapoints Resolved: " + duplicates_fixed.get());
    LOG.info("Orphaned UID Rows: " + orphans.get());
    LOG.info("Orphaned UID Rows Deleted: " + orphans_fixed.get());
    LOG.info("Possible Future Objects: " + future.get());
    LOG.info("Unknown Objects: " + unknown.get());
    LOG.info("Unknown Objects Deleted: " + unknown_fixed.get());
    LOG.info("Unparseable Datapoint Values: " + bad_values.get());
    LOG.info("Unparseable Datapoint Values Deleted: " + bad_values_deleted.get());
    LOG.info("Improperly Encoded Floating Point Values: " + value_encoding.get());
    LOG.info("Improperly Encoded Floating Point Values Fixed: " +
        value_encoding_fixed.get());
    LOG.info("Unparseable Compacted Columns: " + bad_compacted_columns.get());
    LOG.info("Unparseable Compacted Columns Deleted: " +
        bad_compacted_columns_deleted.get());
    LOG.info("Datapoints Qualified for VLE : " + vle.get());
    LOG.info("Datapoints Compressed with VLE: " + vle_fixed.get());
    LOG.info("Bytes Saved with VLE: " + vle_bytes.get());
    LOG.info("Total Errors: " + totalErrors());
    LOG.info("Total Correctable Errors: " + correctable());
    LOG.info("Total Errors Fixed: " + totalFixed());
  }
1028871
def configure_logging(verbosity):
    ''''''
    log_level = max(logging.DEBUG, logging.WARNING - logging.DEBUG*verbosity)
    logging.basicConfig(
        stream=sys.stderr, level=log_level,
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    )

    urllib3_logger = logging.getLogger(
        'requests.packages.urllib3')
    urllib3_logger.setLevel(log_level)

    # if debug level set then its nice to see the headers of the request
    if log_level == logging.DEBUG:
        try:
            import http.client as http_client
        except ImportError:
            # Python 2
            import httplib as http_client
        http_client.HTTPConnection.debuglevel = 1
768661
function logRequest(req, res) {
		var responseTime = Math.round(req.duration),
			shouldLogRequest = requestLogger && req && req.url && req.url !== '/arrowPing.json',
			shouldADILog = options && options.adiLogging && adiLogger && req && req.url && isWhitelisted(req.url),
			time = new Date().getTime(),
			uri = (req.route && req.route.path) || req.path || (req.url && req.url.split('?')[0]),
			localPort = getPort(req);

		if (shouldLogRequest && req.log && req.logname && (req.logmetadata === undefined || req.logmetadata)) {
			requestLogger.info({
				req_id: req.requestId,
				req: req,
				res: res,
				route: req.route,
				name: req._logname,
				logname: req.logname,
				response_time: responseTime
			});

			const result = {
				url: req.url,
				req_headers: req.headers,
				status: res.status,
				req_id: req.requestId,
				name: req._logname,
				logname: req.logname,
				response_time: responseTime
			};
			fs.writeFile(req.logname + '.metadata', JSON.stringify(result));
		} else if (shouldLogRequest) {
			requestLogger.info({
				req_id: req.requestId,
				response_time: responseTime,
				route: req.route,
				req: req,
				res: res
			});
		}

		if (shouldADILog) {
			adiLogger.info({
				type: 'transaction',
				time: time,
				path: uri,
				protocol: req.protocol,
				protocolSrc: localPort,
				duration: responseTime,
				status: getStatus(res),
				serviceContexts: [
					{
						service: '',
						monitor: '',
						client: null,
						org: null,
						app: options.name,
						method: '',
						status: '',
						duration: ''
					}
				],
				customMsgAtts: {},
				correlationId: getCorrelationId(req),
				legs: [
					{
						uri: uri,
						status: res.statusCode,
						statusText: '',
						method: req.method,
						vhost: null,
						wafStatus: 0,
						bytesSent: parseInt(res.get('Content-Length'), 10) || null,
						bytesReceived: parseInt(req.get('Content-Length'), 10) || null,
						remoteName: '',
						remoteAddr: '',
						localAddr: '',
						remotePort: '',
						localPort: '',
						sslsubject: null,
						leg: 0,
						timestamp: time,
						duration: responseTime,
						serviceName: uri,
						subject: null,
						operation: req.method + ' - ' + uri,
						type: req.protocol,
						finalStatus: ''
					}
				]
			});
		}
		if (req.cleanStream) {
			req.cleanStream();
			req.cleanStream = null;
		}
	}
953356
function ListLogSummary (all) {
   this.all = all;
   this.latest = all.length && all[0] || null;
   this.total = all.length;
}
763619
function log_event(req, code, message, elapsed) {
  return {
    code:           code,
    message:        message,
    elapsed:        elapsed,
    request:        req,
    url:            req.originalUrl || req.url,
    method:         req.method,
    headers:        req.headers,
    httpVersion:    req.httpVersion,
    remoteAddress:  req.connection.remoteAddress
  };
}
362191
private void displayMBeans(HttpServletRequest request, HttpServletResponse response) 
      throws ServletException, IOException
   {
      Iterator mbeans;

      try
      {
         mbeans = getDomainData();
      }
      catch (Exception e)
      {
         throw new ServletException("Failed to get MBeans", e);
      }

      request.setAttribute("mbeans", mbeans);
      RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/displaymbeans.jsp");
      rd.forward(request, response);
   }
554508
def log_request(self, code='-', size='-'):
        """"""
        print_size = getattr(thread_local, 'size', -1)
        if size != '-':
            size_str = ' (%s)' % size
        elif print_size >= 0:
            size_str = self.log_size_string(print_size) + ' '
        else:
            size_str = ''
        if not self.server.suppress_noise or (code != 200 and code != 304):
            self.log_message(
                '%s"%s" %s', size_str, self.requestline, str(code))
        if print_size >= 0:
            thread_local.size = -1
580526
private Object toLogString(HttpRequestMessage httpRequest) {
        StringBuilder b = new StringBuilder();
        b.append(httpRequest.getRequestURI()).append('\n');
        final Map<String,List<String>> headers = httpRequest.getHeaders();
        for ( String h: headers.keySet()) {
            b.append(h).append(':').append(' ').append(headers.get(h)).append('\n');
        }
        return b.toString();
    }
76721
function writeParamsForRequestHeaders(entry, out, consumedParams) {
    const params = entry.params;

    if (!(typeof params.line === 'string') ||
        !(params.headers instanceof Array)) {
      // Unrecognized params.
      return;
    }

    // Strip the trailing CRLF that params.line contains.
    const lineWithoutCRLF = params.line.replace(/\r\n$/g, '');
    out.writeArrowIndentedLines([lineWithoutCRLF].concat(params.headers));

    consumedParams.line = true;
    consumedParams.headers = true;
  }
979024
def line_showLog(self):
        
        if self.kernel.mva is None:
            print("Can't show log because no session exists")
        else:
            return self.kernel.Display(HTML(self.kernel.cachedlog))
1006724
def get_breadcrumbs(url, request=None):
    
    from wave.reverse import preserve_builtin_query_params
    from wave.settings import api_settings
    from wave.views import APIView

    view_name_func = api_settings.VIEW_NAME_FUNCTION

    def breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen):
        """
        Add tuples of (name, url) to the breadcrumbs list,
        progressively chomping off parts of the url.
        """

        try:
            (view, unused_args, unused_kwargs) = resolve(url)
        except Exception:
            pass
        else:
            # Check if this is a REST framework view,
            # and if so add it to the breadcrumbs
            cls = getattr(view, 'cls', None)
            if cls is not None and issubclass(cls, APIView):
                # Don't list the same view twice in a row.
                # Probably an optional trailing slash.
                if not seen or seen[-1] != view:
                    suffix = getattr(view, 'suffix', None)
                    name = view_name_func(cls, suffix)
                    insert_url = preserve_builtin_query_params(prefix + url, request)
                    breadcrumbs_list.insert(0, (name, insert_url))
                    seen.append(view)

        if url == '':
            # All done
            return breadcrumbs_list

        elif url.endswith('/'):
            # Drop trailing slash off the end and continue to try to
            # resolve more breadcrumbs
            url = url.rstrip('/')
            return breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen)

        # Drop trailing non-slash off the end and continue to try to
        # resolve more breadcrumbs
        url = url[:url.rfind('/') + 1]
        return breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen)

    prefix = get_script_prefix().rstrip('/')
    url = url[len(prefix):]
    return breadcrumbs_recursive(url, [], prefix, [])
983216
RuntimeException errorStoringSpans(List<Span> spans, Throwable e) {
    metrics.incrementSpansDropped(spans.size());
    // The exception could be related to a span being huge. Instead of filling logs,
    // print trace id, span id pairs
    StringBuilder msg = appendSpanIds(spans, new StringBuilder("Cannot store spans "));
    return doError(msg.toString(), e);
  }
701787
public void getTraceSummaryLine(StringBuilder buff) {
    
    // Get the common fields for control messages
    super.getTraceSummaryLine(buff);
    
    buff.append("requestID=");
    buff.append(getRequestID());
    
  }