Package org.hawaiiframework.logging.util
Class HttpRequestResponseHeadersLogUtil
java.lang.Object
org.hawaiiframework.logging.util.HttpRequestResponseHeadersLogUtil
Utility for logging requests / responses.
The utility can be used to generate HTTP request / response header log strings. Both for incoming service calls as outgoing calls (i.e. calls to backend systems).
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionHttpRequestResponseHeadersLogUtil(PasswordMaskerUtil passwordMasker) The constructor for the log utility. -
Method Summary
Modifier and TypeMethodDescriptiongetCallRequestHeaders(org.springframework.http.HttpRequest request) Get call request headers.getCallResponseHeaders(org.springframework.http.client.ClientHttpResponse response) Get call response headers.getTxRequestHeaders(jakarta.servlet.http.HttpServletRequest servletRequest) Get request headers.getTxResponseHeaders(jakarta.servlet.http.HttpServletResponse servletResponse) Get response headers.
-
Constructor Details
-
HttpRequestResponseHeadersLogUtil
The constructor for the log utility.- Parameters:
passwordMasker- The password masker utility.
-
-
Method Details
-
getTxRequestHeaders
Get request headers. With password masking.- Parameters:
servletRequest- The servlet request.- Returns:
- The headers as string.
-
getTxResponseHeaders
Get response headers. With password masking.- Parameters:
servletResponse- The servlet response.- Returns:
- The headers as string.
-
getCallRequestHeaders
Get call request headers. With password masking.- Parameters:
request- The http request.- Returns:
- The headers as string.
-
getCallResponseHeaders
Get call response headers. With password masking.- Parameters:
response- The http response.- Returns:
- The headers as string.
-