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 Details

  • 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 interface IServerInterceptor
      Overrides:
      incomingRequestPostProcessed in class InterceptorAdapter
      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 the servlet request.
      theRequest - The incoming request
      theResponse - The response. Note that interceptors may choose to provide a response (i.e. by calling ServletResponse.getWriter()) but in that case it is important to return false 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 return false. 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.