Interface LogFormatter<ContainerRequestType,ContainerResponseType>

Type Parameters:
ContainerRequestType - The request type used by the underlying framework
ContainerResponseType - 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 Type
    Method
    Description
    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.
  • 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 request
      res - The completed response
      ctx - The security context produced based on the request
      Returns:
      The log line