Class VerboseLoggingInterceptor
java.lang.Object
ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter
ca.uhn.fhir.rest.server.interceptor.VerboseLoggingInterceptor
- All Implemented Interfaces:
IServerInterceptor
This interceptor creates verbose server log entries containing the complete request and response payloads.
This interceptor is mainly intended for debugging since it will generate very large log entries and could potentially be a security risk since it logs every header and complete payload. Use with caution!
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
incomingRequestPostProcessed
(RequestDetails theRequestDetails, jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse) This method is called just before the actual implementing server method is invoked.Methods inherited from class ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter
handleException, incomingRequestPreHandled, incomingRequestPreProcessed, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, preProcessOutgoingException, processingCompletedNormally
-
Constructor Details
-
VerboseLoggingInterceptor
public VerboseLoggingInterceptor()
-
-
Method Details
-
incomingRequestPostProcessed
public boolean incomingRequestPostProcessed(RequestDetails theRequestDetails, jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse) throws ca.uhn.fhir.rest.server.exceptions.AuthenticationException Description copied from interface:IServerInterceptor
This method is called just before the actual implementing server method is invoked.- Specified by:
incomingRequestPostProcessed
in interfaceIServerInterceptor
- Overrides:
incomingRequestPostProcessed
in classInterceptorAdapter
- Parameters:
theRequestDetails
- A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been pulled out of theservlet request
.theRequest
- The incoming requesttheResponse
- The response. Note that interceptors may choose to provide a response (i.e. by callingServletResponse.getWriter()
) but in that case it is important to returnfalse
to indicate that the server itself should not also provide a response.- Returns:
- Return
true
if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the response normally, you must returnfalse
. In this case, no further processing will occur and no further interceptors will be called. - Throws:
ca.uhn.fhir.rest.server.exceptions.AuthenticationException
- This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the client.
-