mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-11-17 23:31:11 +00:00
Update clients.adoc to show how to log Request/Response for Rest5_Client (#3157)
* Update clients.adoc to show how to log Request/Response for Rest5_Client Signed-off-by: Steven <steven.pearce@nowyoyo.com> * Update clients.adoc to use tabs when available --------- Signed-off-by: Steven <steven.pearce@nowyoyo.com>
This commit is contained in:
parent
6f0263b3af
commit
bc7cfdf6e9
@ -458,11 +458,31 @@ ClientConfiguration.builder()
|
|||||||
== Client Logging
|
== Client Logging
|
||||||
|
|
||||||
To see what is actually sent to and received from the server `Request` / `Response` logging on the transport level needs to be turned on as outlined in the snippet below.
|
To see what is actually sent to and received from the server `Request` / `Response` logging on the transport level needs to be turned on as outlined in the snippet below.
|
||||||
This can be enabled in the Elasticsearch client by setting the level of the `tracer` package to "trace" (see
|
This can be enabled in the Elasticsearch client by setting the level of the `co.elastic.clients.transport.rest5_client.low_level.Request` package to "trace" (see
|
||||||
https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-logging.html)
|
https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/usage/logging)
|
||||||
|
|
||||||
.Enable transport layer logging
|
.Enable transport layer logging
|
||||||
|
[tabs]
|
||||||
|
======
|
||||||
|
XML::
|
||||||
|
+
|
||||||
[source,xml]
|
[source,xml]
|
||||||
----
|
----
|
||||||
<logger name="tracer" level="trace"/>
|
<logger name="co.elastic.clients.transport.rest5_client.low_level.Request" level="trace"/>
|
||||||
----
|
----
|
||||||
|
|
||||||
|
yml::
|
||||||
|
+
|
||||||
|
[source,yml]
|
||||||
|
----
|
||||||
|
logging.level:
|
||||||
|
co.elastic.clients.transport.rest5_client.low_level.Request: trace
|
||||||
|
----
|
||||||
|
|
||||||
|
ini::
|
||||||
|
+
|
||||||
|
[source,ini]
|
||||||
|
----
|
||||||
|
logging.level.co.elastic.clients.transport.rest5_client.low_level.Request=trace
|
||||||
|
----
|
||||||
|
=====
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user