@Test public void testLog() throws ServletException { final HttpServletRequest request = createNiceMock(HttpServletRequest.class); expect(request.getRemoteAddr()).andReturn(REMOTE_ADDR); expect(request.getRequestURI()).andReturn(CONTEXT_PATH + TEST_REQUEST); expect(request.getContextPath()).andReturn(CONTEXT_PATH); expect(request.getQueryString()).andReturn("param1=1"); expect(request.getMethod()).andReturn("GET"); setProperty(Parameter.LOG, TRUE); setUp(); replay(request); monitoringFilter.log(request, "test", 1000, false, 200, 10000); verify(request); }
protected void log(HttpServletRequest httpRequest, String requestName, long duration, boolean systemError, int responseStatus, long responseSize) { if (!logEnabled) { return; } final String filterName = filterConfig.getFilterName(); LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseStatus, responseSize, filterName); }
MonitoringFilter implements Filter { protected void log(HttpServletRequest httpRequest, String requestName, long duration, boolean systemError, int responseStatus, long responseSize) { if (!logEnabled) { return; } final String filterName = filterConfig.getFilterName(); LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseStatus, responseSize, filterName); } }
MonitoringFilter implements Filter { protected void log(HttpServletRequest httpRequest, String requestName, long duration, boolean systemError, int responseStatus, long responseSize) { if (!logEnabled) { return; } final String filterName = filterConfig.getFilterName(); LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseStatus, responseSize, filterName); } MonitoringFilter(); }
MonitoringFilter implements Filter { protected void log(HttpServletRequest httpRequest, String requestName, long duration, boolean systemError, int responseStatus, long responseSize) { if (!logEnabled) { return; } final String filterName = filterConfig.getFilterName(); LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseStatus, responseSize, filterName); } MonitoringFilter(); String getApplicationType(); void setApplicationType(final String applicationType); @Override void init(FilterConfig config); @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); static void registerApplicationNodeInCollectServer(String applicationName,
			URL collectServerUrl, URL applicationNodeUrl); static void unregisterApplicationNodeInCollectServer(); }
MonitoringFilter implements Filter { protected void log(HttpServletRequest httpRequest, String requestName, long duration, boolean systemError, int responseStatus, long responseSize) { if (!logEnabled) { return; } final String filterName = filterConfig.getFilterName(); LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseStatus, responseSize, filterName); } MonitoringFilter(); String getApplicationType(); void setApplicationType(final String applicationType); @Override void init(FilterConfig config); @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); static void registerApplicationNodeInCollectServer(String applicationName,
			URL collectServerUrl, URL applicationNodeUrl); static void unregisterApplicationNodeInCollectServer();  }