Class ApacheCombinedServletLogFormatter<ContainerRequestType extends jakarta.servlet.http.HttpServletRequest,ContainerResponseType extends jakarta.servlet.http.HttpServletResponse>

java.lang.Object
com.amazonaws.serverless.proxy.internal.servlet.ApacheCombinedServletLogFormatter<ContainerRequestType,ContainerResponseType>
Type Parameters:
ContainerRequestType - An implementation of HttpServletRequest
ContainerResponseType - An implementation of HttpServletResponse
All Implemented Interfaces:
LogFormatter<ContainerRequestType,ContainerResponseType>

public class ApacheCombinedServletLogFormatter<ContainerRequestType extends jakarta.servlet.http.HttpServletRequest,ContainerResponseType extends jakarta.servlet.http.HttpServletResponse> extends Object implements LogFormatter<ContainerRequestType,ContainerResponseType>
Default implementation of the log formatter. Based on an HttpServletRequest and HttpServletResponse implementations produced a log line in the Apache combined log format: https://httpd.apache.org/docs/2.4/logs.html
  • Constructor Details

    • ApacheCombinedServletLogFormatter

      public ApacheCombinedServletLogFormatter()
  • Method Details

    • format

      public String format(ContainerRequestType servletRequest, ContainerResponseType servletResponse, jakarta.ws.rs.core.SecurityContext ctx)
      Description copied from interface: LogFormatter
      The format method is called by the container handler to produce the log line that should be written to the logs.
      Specified by:
      format in interface LogFormatter<ContainerRequestType extends jakarta.servlet.http.HttpServletRequest,ContainerResponseType extends jakarta.servlet.http.HttpServletResponse>
      Parameters:
      servletRequest - The incoming request
      servletResponse - The completed response
      ctx - The security context produced based on the request
      Returns:
      The log line