org.springframework.web.filter
Class ServletContextRequestLoggingFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.web.filter.AbstractRequestLoggingFilter
org.springframework.web.filter.ServletContextRequestLoggingFilter
- All Implemented Interfaces:
- Filter, Aware, BeanNameAware, DisposableBean, InitializingBean, EnvironmentAware, 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:
AbstractRequestLoggingFilter.setIncludeQueryString(boolean)
,
AbstractRequestLoggingFilter.setBeforeMessagePrefix(java.lang.String)
,
AbstractRequestLoggingFilter.setBeforeMessageSuffix(java.lang.String)
,
AbstractRequestLoggingFilter.setAfterMessagePrefix(java.lang.String)
,
AbstractRequestLoggingFilter.setAfterMessageSuffix(java.lang.String)
,
ServletContext.log(String)
Methods inherited from class org.springframework.web.filter.AbstractRequestLoggingFilter |
createMessage, doFilterInternal, getMaxPayloadLength, isIncludeClientInfo, isIncludePayload, isIncludeQueryString, setAfterMessagePrefix, setAfterMessageSuffix, setBeforeMessagePrefix, setBeforeMessageSuffix, setIncludeClientInfo, setIncludePayload, setIncludeQueryString, setMaxPayloadLength |
Methods inherited from class org.springframework.web.filter.GenericFilterBean |
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextRequestLoggingFilter
public ServletContextRequestLoggingFilter()
beforeRequest
protected void beforeRequest(HttpServletRequest request,
String message)
- Writes a log message before the request is processed.
- Specified by:
beforeRequest
in class AbstractRequestLoggingFilter
- Parameters:
request
- current HTTP requestmessage
- the message to log
afterRequest
protected void afterRequest(HttpServletRequest request,
String message)
- Writes a log message after the request is processed.
- Specified by:
afterRequest
in class AbstractRequestLoggingFilter
- Parameters:
request
- current HTTP requestmessage
- the message to log