src/org/ohmage/jee/filter/Log4jNdcFilter.java
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
		throws ServletException, IOException {	
		
		String requestId = UUID.randomUUID().toString();
		request.setAttribute(ATTRIBUTE_REQUEST_ID, requestId);
		
		NDC.push(requestId);
		
		// Execute the rest of the filters in the chain and then whatever Servlet is bound to the current request URI
		chain.doFilter(request, response);
		
		// cleanup -- remove the NDC for the current thread
		NDC.remove();
	}
/**
	 * Pushes a UUID into the Log4J NDC for request tracking and debugging.
	 */
Pushes a UUID into the Log4J NDC for request tracking and debugging.
Pushes a UUID into the Log4J NDC for request tracking and debugging .
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
		throws ServletException, IOException {	
		String requestId = UUID.randomUUID().toString();
		request.setAttribute(ATTRIBUTE_REQUEST_ID, requestId);
		NDC.push(requestId);
		chain.doFilter(request, response);
		NDC.remove();
	}
public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws ServletException , IOException { String requestId = UUID . randomUUID ( ) . toString ( ) ; request . setAttribute ( ATTRIBUTE_REQUEST_ID , requestId ) ; NDC . push ( requestId ) ; chain . doFilter ( request , response ) ; NDC . remove ( ) ; }
Pushes a UUID into the Log4J NDC for request tracking and debugging.
Pushes a UUID into the Log4J NDC for request tracking and debugging .
// Execute the rest of the filters in the chain and then whatever Servlet is bound to the current request URI // cleanup -- remove the NDC for the current thread