I need to create a custom access log valve similar to the FastCommonAccessLogValve which I guess is the default one used in Tomcat. The difference is that I want to output to more than one different log files depending on the value of a session object.
E.g. When the following request: http://localhost:8080/portal/portal/default/main is processed in the Valve, the session object is missing but immediately after that when http://localhost:8080/images/139.gif or any other request follows, the object is there. The session id is the same in all requests but the session object differs. It's one for the first request (the one for the page) and another for all subsequent requests (the ones for the page images and css).