code: @Override
      public void filter(final ClientRequestContext context) throws IOException {
          final long id = _id.incrementAndGet();
          context.setProperty(LOGGING_ID_PROPERTY, id);
  
          final StringBuilder b = new StringBuilder();
  
          printRequestLine(b, "Sending client request", id, context.getMethod(), context.getUri());
          printPrefixedHeaders(b, id, REQUEST_PREFIX, context.getStringHeaders());
  
          if (printEntity && context.hasEntity() && isSupportPrintType(context.getMediaType())) {
              final OutputStream stream = new LoggingStream(b, context.getEntityStream());
              context.setEntityStream(stream);
              context.setProperty(ENTITY_LOGGER_PROPERTY, stream);
              // not calling log(b) here - it will be called by the interceptor
          } else {
              log(b);
          }
      }
docs: {@inheritDoc}