How do I see wire level response from Elasticsearch

Viewed 113

How do I see wire level response from Elasticsearch, I just see the following

2021-01-26 11:26:13.453 TRACE 40278 --- [/O dispatcher 1] o.s.data.elasticsearch.client.WIRE       : [65ded487] Received raw response: 200 OK

src/main/resources/application.properties contain the following

logging.level.org.springframework.data.elasticsearch=TRACE
logging.level.org.springframework.data.elasticsearch.core=TRACE
logging.level.org.springframework.data.elasticsearch.client.WIRE=TRACE
1 Answers

I just checked the code, the response body is logged when using the reactive stack but in non-reactive code only the status line is logged. You might want to create an issue to address this.

What you can do is start a local intercepting proxy like burp or OWASP ZAP and configure the Spring Data Elasticsearch to use this proxy. There you can see all the requests anhd responses with headers and all the information going through the wire.

Related