public class PerformanceLoggingFilter extends Object implements javax.servlet.Filter
FilterChain that handles timing a HttpServletRequest and reporting on the state of
resource consumption. The following information gets logged from this Filter at the INFO log level.
| Constructor and Description |
|---|
PerformanceLoggingFilter() |
public void destroy()
destroy in interface javax.servlet.FilterFilter.destroy()public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionFilter.init(FilterConfig)public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
Does the actual logging. The log4j.properties file already covers user and date/time logging for us, so the only thing that gets logged in INFO here is the intended action.
Memory used for a request is calculated with Runtime.freeMemory() and
Runtime.totalMemory()
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionFilter.doFilter(ServletRequest,ServletResponse,FilterChain),
Runtime.totalMemory(),
Runtime.freeMemory()Copyright © 2013 The Kuali Foundation. All Rights Reserved.