Class IdServerMDCRequestProcessor

java.lang.Object
com.io7m.idstore.server.logging.IdServerMDCRequestProcessor
All Implemented Interfaces:
IdServerMDCProcessorType, AutoCloseable

public final class IdServerMDCRequestProcessor extends Object implements IdServerMDCProcessorType
An MDC processor that adds MDC properties for an HTTP request.
  • Method Details

    • mdcForRequest

      public static IdServerMDCProcessorType mdcForRequest(org.eclipse.jetty.server.Request inRequest)
      An MDC processor that adds MDC properties for an HTTP request.
      Parameters:
      inRequest - The request
      Returns:
      The processor
    • mdcForRequest

      public static IdServerMDCProcessorType mdcForRequest(jakarta.servlet.http.HttpServletRequest inRequest)
      An MDC processor that adds MDC properties for an HTTP request.
      Parameters:
      inRequest - The request
      Returns:
      The processor
    • close

      public void close() throws RuntimeException
      Description copied from interface: IdServerMDCProcessorType
      Remove any MDC properties that were added by the processor.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface IdServerMDCProcessorType
      Throws:
      RuntimeException - On errors