Class ServletContextRequestLoggingFilter

All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, ServletContextAware

public class ServletContextRequestLoggingFilter extends AbstractRequestLoggingFilter
Simple request logging filter that writes the request URI (and optionally the query string) to the ServletContext log.
Since:
1.2.5
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • ServletContextRequestLoggingFilter

      public ServletContextRequestLoggingFilter()
  • Method Details

    • beforeRequest

      protected void beforeRequest(jakarta.servlet.http.HttpServletRequest request, String message)
      Writes a log message before the request is processed.
      Specified by:
      beforeRequest in class AbstractRequestLoggingFilter
      Parameters:
      request - current HTTP request
      message - the message to log
    • afterRequest

      protected void afterRequest(jakarta.servlet.http.HttpServletRequest request, String message)
      Writes a log message after the request is processed.
      Specified by:
      afterRequest in class AbstractRequestLoggingFilter
      Parameters:
      request - current HTTP request
      message - the message to log