From 986ce08aabd4d00b5c4467ce8edad864e44e71bd Mon Sep 17 00:00:00 2001 From: "Chris (ChrisJr404)" <11917633+ChrisJr404@users.noreply.github.com> Date: Wed, 26 Aug 2026 22:26:23 -0400 Subject: [PATCH] Document that Logger reflects Feign's Request, not the wire request --- core/src/main/java/feign/Logger.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/feign/Logger.java b/core/src/main/java/feign/Logger.java index a40362093..6e397ff77 100644 --- a/core/src/main/java/feign/Logger.java +++ b/core/src/main/java/feign/Logger.java @@ -32,7 +32,18 @@ import java.util.logging.LogRecord; import java.util.logging.SimpleFormatter; -/** Simple logging abstraction for debug messages. Adapted from {@code retrofit.RestAdapter.Log}. */ +/** + * Simple logging abstraction for debug messages. Adapted from {@code retrofit.RestAdapter.Log}. + * + *

Request logging reflects the {@link Request} that Feign builds from the method invocation, + * captured before it is handed to the {@link Client}. Depending on the {@link Client} + * implementation, the bytes actually sent over the wire may differ from what is logged here. In + * particular the default {@link Client.Default} is backed by {@link java.net.HttpURLConnection}, + * which silently drops headers the JDK treats as restricted (for example {@code Host}, {@code + * Connection} and {@code Content-Length}) unless the {@code sun.net.http.allowRestrictedHeaders} + * system property is set, so such a header can appear in the log without being present in the + * outgoing request. + */ public abstract class Logger { protected static String methodTag(String configKey) {