Package com.amazonaws.serverless.proxy
Interface LogFormatter<ContainerRequestType,ContainerResponseType>
- Type Parameters:
ContainerRequestType- The request type used by the underlying frameworkContainerResponseType- The response type produced by the underlying framework
- All Known Implementing Classes:
ApacheCombinedServletLogFormatter
public interface LogFormatter<ContainerRequestType,ContainerResponseType>
Implementations of the log formatter interface are used by
LambdaContainerHandler class to log each request
processed in the container. You can set the log formatter using the LambdaContainerHandler.setLogFormatter(LogFormatter)
method. The servlet implementation of the container (AwsLambdaServletContainerHandler includes a
default log formatter that produces Apache combined logs. ApacheCombinedServletLogFormatter.-
Method Summary
Modifier and TypeMethodDescriptionformat(ContainerRequestType req, ContainerResponseType res, jakarta.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.
-
Method Details
-
format
String format(ContainerRequestType req, ContainerResponseType res, jakarta.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.- Parameters:
req- The incoming requestres- The completed responsectx- The security context produced based on the request- Returns:
- The log line
-