Interface LogFormatter
- All Known Implementing Classes:
JsonLogFormatter
,PrettyPrintLogFormatter
public interface LogFormatter
Abstraction for a log formatter of HTTP requests/responses.
-
Method Summary
-
Method Details
-
format
String format(String loggingId, org.springframework.http.HttpRequest request, byte[] body) throws IOException Logs the given HTTP request.- Parameters:
loggingId
- An ID used to correlate the logging of an HTTP request with its corresponding HTTP response.request
- The HTTP request to log.body
- The body of the HTTP request to log.- Returns:
- The string to log for the HTTP request.
- Throws:
IOException
- in case of an error
-
format
String format(String loggingId, org.springframework.http.client.ClientHttpResponse response) throws IOException Logs the given HTTP response.- Parameters:
loggingId
- An ID used to correlate the logging of an HTTP request with its corresponding HTTP response.response
- The HTTP response to log.- Returns:
- The string to log for the HTTP response.
- Throws:
IOException
- in case of an error
-