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) {