protected void logRequest(String configKey, Level logLevel, Request request) {
    String protocolVersion = resolveProtocolVersion(request.protocolVersion());
    log(configKey, "---> %s %s %s", request.httpMethod().name(), request.url(), protocolVersion);
    if (logLevel.ordinal() >= Level.HEADERS.ordinal()) {

      for (String field : request.headers().keySet()) {
        if (shouldLogRequestHeader(field)) {
          for (String value : valuesOrEmpty(request.headers(), field)) {
            log(configKey, "%s: %s", field, value);
          }
        }
      }

      int bodyLength = 0;
      if (request.body() != null) {
        bodyLength = request.length();
        if (logLevel.ordinal() >= Level.FULL.ordinal()) {
          String bodyText =
              request.charset() != null ? new String(request.body(), request.charset()) : null;
          log(configKey, ""); // CRLF
          log(configKey, "%s", bodyText != null ? bodyText : "Binary data");
        }
      }
      log(configKey, "---> END HTTP (%s-byte body)", bodyLength);
    }
  }
Override to filter out response headers.

@param header header name
@return true to log a response header
core/src/main/java/feign/Logger.java