@@ -0,0 +1,1416 @@
+package net.etalia.crepuscolo.mvc;%0A%0Aimport java.io.IOException;%0A%0Aimport javax.servlet.Filter;%0Aimport javax.servlet.FilterChain;%0Aimport javax.servlet.FilterConfig;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.ServletRequest;%0Aimport javax.servlet.ServletResponse;%0Aimport javax.servlet.http.HttpServletRequest;%0A%0Aimport org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A%0Apublic class RequestLoggerFilter implements Filter %7B%0A%0A%09protected Log log = LogFactory.getLog(RequestLoggerFilter.class);%0A%0A%09@Override%0A%09public void init(FilterConfig filterConfig) throws ServletException %7B%0A%09%7D%0A%0A%09@Override%0A%09public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException %7B%0A%09%09long start = System.currentTimeMillis();%0A%09%09chain.doFilter(request, response);%0A%09%09long end = System.currentTimeMillis();%0A%09%09long time = end - start;%0A%09%09String url = null;%0A%09%09String queryString = null;%0A%09%09String method = null;%0A%09%09if (request instanceof HttpServletRequest) %7B%0A%09%09%09url = ((HttpServletRequest)request).getContextPath();%0A%09%09%09url += ((HttpServletRequest)request).getServletPath();%0A%09%09%09queryString = ((HttpServletRequest)request).getQueryString();%0A%09%09%09method = ((HttpServletRequest)request).getMethod();%0A%09%09%7D%0A%09%09log.info(%22TIME: %22 + time + %22 - METHOD: %22 + method + %22 - URL: %22 + url + %22 - PARAMS: %22 + queryString);%0A%09%7D%0A%0A%09@Override%0A%09public void destroy() %7B%0A%09%7D%0A%0A%7D%0A

Add RequestLoggerFilter