private void logTimes(long startTime, String sourceIP,
                          long renderStartTime, long commitStartTime, long endTime,
                          String req, ExtendedResponse response) {

        // note: intentionally only taking time since request was received
        long totalTime = endTime - startTime;

        long timeoutInterval;
        long requestOverhead;
        long summaryStartTime;
        Timing t = response.getTiming();
        if (t != null) {
            timeoutInterval = t.getTimeout();
            long queryStartTime = t.getQueryStartTime();
            requestOverhead = (queryStartTime > 0) ? queryStartTime - startTime : 0;
            summaryStartTime = t.getSummaryStartTime();
        } else {
            requestOverhead = 0;
            summaryStartTime = 0;
            timeoutInterval = Long.MAX_VALUE;
        }

        if (totalTime <= timeoutInterval) return;

        log.log(Level.FINE, () -> {
            StringBuilder b = new StringBuilder();
            b.append(response.getParsedQuery());
            b.append(" from ").append(sourceIP).append(". ");
            if (requestOverhead > 0) {
                b.append("Time from HTTP connection open to request reception ");
                b.append(requestOverhead).append(" ms. ");
            }
            if (summaryStartTime != 0) {
                b.append("Request time: ");
                b.append(summaryStartTime - startTime).append(" ms. ");
                b.append("Summary fetch time: ");
                b.append(renderStartTime - summaryStartTime).append(" ms. ");
            } else {
                long spentSearching = renderStartTime - startTime;
                b.append("Processing time: ").append(spentSearching).append(" ms. ");
            }
            b.append("Result rendering/transfer: ");
            b.append(commitStartTime - renderStartTime).append(" ms. ");
            b.append("End transaction: ");
            b.append(endTime - commitStartTime).append(" ms. ");
            b.append("Total: ").append(totalTime).append(" ms. ");
            b.append("Timeout: ").append(timeoutInterval).append(" ms. ");
            b.append("Request string: ").append(req);
            return b.toString();
        });
    }
A request handler base class extending the features of
ThreadedHttpRequestHandler with access logging.

@author Steinar Knutsen

@deprecated  Use {@link ThreadedHttpRequestHandler}, which provides the same level of functionality.
container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java