> Is it possible to set one request log per virtual host / context?
> With the following I am able to define a request log, but it is
> global for all contexts. Any help would be appreciated.
> <Ref id="requestLog">
> <Set name="requestLog">
> <New id="requestLogImpl"
> <Arg><SystemProperty name="jetty.home" default="." />/logs/
> <Set name="retainDays">90</Set>
> <Set name="append">true</Set>
> <Set name="extended">true</Set>
> <Set name="LogTimeZone">CET</Set>
There are 2 options I can see.
(a) write your own RequestLog implementation. You can probably do
some relatively minor tweaks to NCSAReqLog to do that.
(b) Rework your handler stack a bit to have 2 separate request log
handlers, each with their own req-log implementation.
You might need to tweak the request log handler a little, but
I suspect not.
I'd probably go with (b) because it suits my design tastes a little
better - it relies on Jetty to make the decision about which context
the request belonged to, rather than having the log impl duplicate
that logic. But both seem like reasonable choices.
Have a go with one of those and then post back to tell us how it
went. (And ask for more help if required)