Ajay
Ajay

Reputation: 485

Log request/response from ElasticSearch Transport client with SpringBoot application

I'm using ElasticSearch's Transport Client in my SpringBoot application. Logback is used as my logging implementation.

Is there a way to enable logging of request/response from ElasticSearch Transport client to help in troubleshooting?

Upvotes: 1

Views: 1039

Answers (1)

Ajay
Ajay

Reputation: 485

For logging the request to Elastic Search doing a toString on SearchRequestBuilder should give you the actual JSON request. For logging the response doing a toString on SearchResponse should give you the actual JSON response.

Upvotes: 1

Related Questions