diff --git a/common/src/main/java/com/yunbao/common/http/HttpLoggingInterceptor.java b/common/src/main/java/com/yunbao/common/http/HttpLoggingInterceptor.java index 74acc0e19..6b730c1f5 100644 --- a/common/src/main/java/com/yunbao/common/http/HttpLoggingInterceptor.java +++ b/common/src/main/java/com/yunbao/common/http/HttpLoggingInterceptor.java @@ -107,6 +107,9 @@ public class HttpLoggingInterceptor implements Interceptor { String name = headers.name(i); // Skip headers from the request body as they are explicitly logged above. if (!"Content-Type".equalsIgnoreCase(name) && !"Content-Length".equalsIgnoreCase(name)) { + if (i == 0){ + log("请求头:"); + } log("\t" + name + ": " + headers.value(i)); } } @@ -114,6 +117,7 @@ public class HttpLoggingInterceptor implements Interceptor { log(" "); if (logBody && hasRequestBody) { if (isPlaintext(requestBody.contentType())) { + log("request Body :"); bodyToString(request); } else { log("\tbody: maybe [binary body], omitted!");