I like case 2.

In the case of the malformed request. We might not be able to determine the host or the path (and therefore the appropriate webapp (or host))

In the common case (admin), I would hope that there is an AccessLog at the EngineLevel. So we might be able to do the following ...
- Create a new Interface called AccessLog (like Mark's suggestion)
- It has one method: log(request, response)
- CoyoteAdapter Can trap the conditions where it doesn't send the request down the pipeline. - Instead of not logging the requests, it will find any Valves with AccessLog interface and call log(...)

With any luck, the request, response pair will still be complete enough to ensure that the access loggers don't reach any weird conditions. [Unexpected NPE, etc]

I think the hardest part of the above is cleanly changing CoyoteAdapter since I see multiple spots where logging is skipped.

-Tim

On 4/28/2010 8:14 PM, Mark Thomas wrote:
2. Provide hooks in access log valves to allow CoyoteAdaptor to log
these rejections via the access log valve
Pros: All access logs in one place
Could be used by other components
Cons: More complex solution. CoyoteAdaptor would have to navigate
container hierarchy to find access log. Probably need a new AccessLog
interface to enable CoyoteAdaptor to work with multiple implementations.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to