@Override
    public void filter(final ClientRequestContext requestContext, final ClientResponseContext responseContext)
            throws IOException {
        final Object requestId = requestContext.getProperty(LOGGING_ID_PROPERTY);
        final long id = requestId != null ? (Long) requestId : _id.incrementAndGet();

        StringBuilder b = (StringBuilder) requestContext.getProperty(LOGGER_BUFFER_PROPERTY);
        if (b == null) {
            b = new StringBuilder();
            requestContext.setProperty(LOGGER_BUFFER_PROPERTY, b);
        }

        printResponseLine(b, "Client response received", id, responseContext.getStatus());
        printPrefixedHeaders(b, id, RESPONSE_PREFIX, responseContext.getHeaders());

        if (printEntity && responseContext.hasEntity() && isSupportPrintType(responseContext.getMediaType())) {
            responseContext.setEntityStream(logInboundEntity(b, responseContext.getEntityStream(),
                    MessageUtils.getCharset(responseContext.getMediaType())));
        }

        log(b);
    }
@ Override public void filter ( final ClientRequestContext requestContext , final ClientResponseContext responseContext ) throws IOException { final Object requestId = requestContext . getProperty ( LOGGING_ID_PROPERTY ) ; final long id = requestId != null ? ( Long ) requestId : _id . incrementAndGet ( ) ; StringBuilder b = ( StringBuilder ) requestContext . getProperty ( LOGGER_BUFFER_PROPERTY ) ; if ( b == null ) { b = new StringBuilder ( ) ; requestContext . setProperty ( LOGGER_BUFFER_PROPERTY , b ) ; } printResponseLine ( b , "Client response received" , id , responseContext . getStatus ( ) ) ; printPrefixedHeaders ( b , id , RESPONSE_PREFIX , responseContext . getHeaders ( ) ) ; if ( printEntity && responseContext . hasEntity ( ) && isSupportPrintType ( responseContext . getMediaType ( ) ) ) { responseContext . setEntityStream ( logInboundEntity ( b , responseContext . getEntityStream ( ) , MessageUtils . getCharset ( responseContext . getMediaType ( ) ) ) ) ; } log ( b ) ; }
{@inheritDoc}