Class ClientLogger
java.lang.Object
org.springframework.data.elasticsearch.client.ClientLogger
Deprecated.
since 5.0, Elasticsearch's RestClient has a trace level logging available.
Logging Utility to log client requests and responses. Logs client requests and responses to Elasticsearch to a
dedicated logger:
org.springframework.data.elasticsearch.client.WIRE
on trace level.- Since:
- 3.2
- Author:
- Mark Paluch, Christoph Strobl, Peter-Josef Meisch, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deprecated.Returns true if the logger is enabled.static void
logRawResponse
(String logId, Integer statusCode) Deprecated.Log a raw HTTP response without logging the body.static void
logRawResponse
(String logId, Integer statusCode, String headers) Deprecated.Log a raw HTTP response without logging the body.static void
logRequest
(String logId, String method, String endpoint, Object parameters) Deprecated.Log an outgoing HTTP request.static void
Deprecated.Log an outgoing HTTP request.static void
logRequest
(String logId, String method, String endpoint, Object parameters, String headers, Supplier<Object> body) Deprecated.Log an outgoing HTTP request with a request body.static void
Deprecated.Log an outgoing HTTP request with a request body.static void
logResponse
(String logId, Integer statusCode, String body) Deprecated.Log a raw HTTP response along with the body.static void
logResponse
(String logId, Integer statusCode, String headers, String body) Deprecated.Log a raw HTTP response along with the body.static String
newLogId()
Deprecated.Creates a new, unique correlation id to improve tracing across log events.
-
Method Details
-
isEnabled
public static boolean isEnabled()Deprecated.Returns true if the logger is enabled.- Returns:
- true if the logger is enabled.
-
logRequest
Deprecated.Log an outgoing HTTP request.- Parameters:
logId
- the correlation id, seenewLogId()
.method
- HTTP methodendpoint
- URIparameters
- optional parameters.
-
logRequest
public static void logRequest(String logId, String method, String endpoint, Object parameters, String headers) Deprecated.Log an outgoing HTTP request.- Parameters:
logId
- the correlation id, seenewLogId()
.method
- HTTP methodendpoint
- URIparameters
- optional parameters.headers
- a String containing the headers- Since:
- 4.4
-
logRequest
public static void logRequest(String logId, String method, String endpoint, Object parameters, Supplier<Object> body) Deprecated.Log an outgoing HTTP request with a request body.- Parameters:
logId
- the correlation id, seenewLogId()
.method
- HTTP methodendpoint
- URIparameters
- optional parameters.body
- body content supplier.
-
logRequest
public static void logRequest(String logId, String method, String endpoint, Object parameters, String headers, Supplier<Object> body) Deprecated.Log an outgoing HTTP request with a request body.- Parameters:
logId
- the correlation id, seenewLogId()
.method
- HTTP methodendpoint
- URIparameters
- optional parameters.headers
- a String containing the headersbody
- body content supplier.- Since:
- 4.4
-
logRawResponse
Deprecated.Log a raw HTTP response without logging the body.- Parameters:
logId
- the correlation id, seenewLogId()
.statusCode
- the HTTP status code.
-
logRawResponse
Deprecated.Log a raw HTTP response without logging the body.- Parameters:
logId
- the correlation id, seenewLogId()
.statusCode
- the HTTP status code.headers
- a String containing the headers
-
logResponse
Deprecated.Log a raw HTTP response along with the body.- Parameters:
logId
- the correlation id, seenewLogId()
.statusCode
- the HTTP status code.body
- body content.
-
logResponse
public static void logResponse(String logId, @Nullable Integer statusCode, String headers, String body) Deprecated.Log a raw HTTP response along with the body.- Parameters:
logId
- the correlation id, seenewLogId()
.statusCode
- the HTTP status code.headers
- a String containing the headersbody
- body content.- Since:
- 4.4
-
newLogId
Deprecated.Creates a new, unique correlation id to improve tracing across log events.- Returns:
- a new, unique correlation id.
-