Class ApacheCombinedServletLogFormatter<ContainerRequestType extends javax.servlet.http.HttpServletRequest,ContainerResponseType extends javax.servlet.http.HttpServletResponse>
java.lang.Object
com.amazonaws.serverless.proxy.internal.servlet.ApacheCombinedServletLogFormatter<ContainerRequestType,ContainerResponseType>
- Type Parameters:
ContainerRequestType- An implementation ofHttpServletRequestContainerResponseType- An implementation ofHttpServletResponse
- All Implemented Interfaces:
LogFormatter<ContainerRequestType,ContainerResponseType>
public class ApacheCombinedServletLogFormatter<ContainerRequestType extends javax.servlet.http.HttpServletRequest,ContainerResponseType extends javax.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat(ContainerRequestType servletRequest, ContainerResponseType servletResponse, javax.ws.rs.core.SecurityContext ctx)The format method is called by the container handler to produce the log line that should be written to the logs.
-
Constructor Details
-
ApacheCombinedServletLogFormatter
public ApacheCombinedServletLogFormatter()
-
-
Method Details
-
format
public String format(ContainerRequestType servletRequest, ContainerResponseType servletResponse, javax.ws.rs.core.SecurityContext ctx)Description copied from interface:LogFormatterThe format method is called by the container handler to produce the log line that should be written to the logs.- Specified by:
formatin interfaceLogFormatter<ContainerRequestType extends javax.servlet.http.HttpServletRequest,ContainerResponseType extends javax.servlet.http.HttpServletResponse>- Parameters:
servletRequest- The incoming requestservletResponse- The completed responsectx- The security context produced based on the request- Returns:
- The log line
-