code: @Override
      public void filter(final ContainerRequestContext requestContext, final ContainerResponseContext responseContext)
              throws IOException {
  
          final Object requestId = requestContext.getProperty(LOGGING_ID_PROPERTY);
          final long id = requestId != null ? (Long) requestId : _id.incrementAndGet();
  
          final StringBuilder b = new StringBuilder();
          requestContext.setProperty(LOGGER_BUFFER_PROPERTY, b);
  
          printResponseLine(b, "Server responded with a response", id, responseContext.getStatus());
          if (printEntity && isSupportPrintType(responseContext.getMediaType()) && responseContext.hasEntity()) {
              final OutputStream stream = new LoggingStream(b, responseContext.getEntityStream());
              responseContext.setEntityStream(stream);
              requestContext.setProperty(ENTITY_LOGGER_PROPERTY, stream);
              // not calling log(b) here - it will be called by the interceptor
          }
      }
docs: {@inheritDoc}