Is your feature request related to a problem? Please describe. Apologies if this is lack of understanding on my part. It seems that when FULL logging is configured we're getting 16 log messages per feign REST call. Appreciate exact number will vary depending on headers but we have several dozen feign clients making a large number of calls resulting in tens of thousands of log messages per minute.
Describe the solution you'd like Could we have as an option a single log message per REST call in JSON format, perhaps configured somewhere in the FeignClientConfiguration beans, for example:
{
"status": 200,
"request_headers": [<list of HTTP request headers>],
"response_headers": [<list of HTTP response headers>],
"payload": <REST payload>
}
So, logging exactly the same information as the current implementation but with a single log message.
Describe alternatives you've considered The FULL logging is so extremely useful (even though it's understood that logging the payload is inherently expensive), it's just the sheer number of log messages that is causing issues.
Additional context Here's a snippet from a sanitized Kubernetes log for a single REST call - each line here represents a separate log message:
[WidgetServiceClient#getWidgetByCrmId] ---> GET http://widget-onlineservice-events:9090/event/1/0/widgets?crmId=e4894800-7165-d7c2-f333-50b69c8ca0b8 HTTP/1.1
[WidgetServiceClient#getWidgetByCrmId] X-Request-ID: widgets:1648849502
[WidgetServiceClient#getWidgetByCrmId] ---> END HTTP (0-byte body)
[WidgetServiceClient#getWidgetByCrmId] <--- HTTP/1.1 200 OK (6ms)
[WidgetServiceClient#getWidgetByCrmId] access-control-allow-credentials: true
[WidgetServiceClient#getWidgetByCrmId] access-control-allow-headers: X-Logout,X-Client-Id,X-Request-Id,X-Connect-Request-Id,X-Client-Location,geoip,geolocation,request-id,X-Cucumber-SessionId
[WidgetServiceClient#getWidgetByCrmId] access-control-request-method: GET, POST, PUT, DELETE, OPTIONS
[WidgetServiceClient#getWidgetByCrmId] cache-control: no-cache, must-revalidate
[WidgetServiceClient#getWidgetByCrmId] content-length: 1403
[WidgetServiceClient#getWidgetByCrmId] content-type: application/json
[WidgetServiceClient#getWidgetByCrmId] date: Fri, 01 Apr 2022 21:45:06 GMT
[WidgetServiceClient#getWidgetByCrmId] expires: 0
[WidgetServiceClient#getWidgetByCrmId] http.status: 200
[WidgetServiceClient#getWidgetByCrmId]
[WidgetServiceClient#getWidgetByCrmId] {"payload":"dummy"}
[WidgetServiceClient#getWidgetByCrmId] <--- END HTTP (1403-byte body)
Comment From: OlgaMaciaszek
Hello, @Ed42 logging is managed by the https://github.com/OpenFeign/feign project, not by Spring Cloud OpenFeign, so any issues related to it should be opened there.