public void logResponse(Config config, HttpRequest request, Response response) {
        long startTime = request.getStartTime();
        long elapsedTime = request.getEndTime() - startTime;
        response.setResponseTime(elapsedTime);
        StringBuilder sb = new StringBuilder();
        String uri = request.getUrl();
        HttpLogModifier responseModifier = logModifier(config, uri);
        sb.append("response time in milliseconds: ").append(elapsedTime).append('\n');
        sb.append(requestCount).append(" < ").append(response.getStatus());
        logHeaders(requestCount, " < ", sb, responseModifier, response.getHeaders());
        ResourceType rt = response.getResourceType();
        if (rt == null || rt.isBinary()) {
            // don't log body
        } else {
            logBody(config, responseModifier, sb, uri, response.getBody(), false, rt);
        }
        sb.append('\n');
        logger.debug("{}", sb);
    }
@Test
    void testResponseLoggingTurtlePretty() {
        config.configure("logPrettyResponse", new Variable(true));
        setup("ttl", TURTLE_SAMPLE, "text/turtle");
        httpRequestBuilder.path("/ttl");
        Response response = handle();
        assertEquals(response.getBodyAsString(), TURTLE_SAMPLE);
        assertTrue(response.getContentType().contains("text/turtle"));

        httpLogger.logResponse(config, request, response);
        String logs = logAppender.collect();
        assertTrue(logs.contains(TURTLE_SAMPLE));
        assertTrue(logs.contains("Content-Type: text/turtle"));
    }