Greg (Steuck),

Go for it dude. Submit me the patch via the mail list, and I'll commit it to the AvalonApps CVS depot. You've seen PhoenixLogSink and it was not so complicated.

On the license issue, I've done the work so far under Apache license with Greg Wilkin's knowledge, but maybe 45 lines is too much. If that is the case then we could move the entire block to SourceForge and use Mortbay's own license rather than Apache. It would be a sister project to Jetty itself , depending on it, the minimal Sevak jar and Avalon-Framework of course.

Thoughts?

Regards,

- Paul



Hello,

I'm running Sevak/Jetty and I would like to log processed requests.
There seems to exist 2 ways to do that: use Jetty's native request
logging or implement logging at the Avalon container layer. I feel it's
beneficial to have all logging controlled in one place: the container.

Fortunately Jetty is very flexible, so what we can do is implement
interface org.mortbay.http.RequestLog and then pass this implementation
to setRequestLog of org.mortbay.jetty.Server that JettySevak builds.
Jetty already comes with NCSARequestLog implementing RequestLog. In my
opinion it is a bit too specialized for Jetty use to be reused for our
purposes.

We can enable Avalon space logging in Sevak Jetty by performing the
following steps:

* declare o.a.a.a.sevak.blocks.jetty.RequestLogger role
with a sole method
void log(HttpRequest request, HttpResponse response, int responseLength)
* make o.a.a.a.sevak.blocks.jetty.JettySevak dependent on
RequestLogger service
* setRequestLog for Server in JettySevak.initialize() using a simple
adapter from RequestLogger to org.mortbay.http.RequestLog. That
adapter will provide empty implementations of
org.mortbay.util.LifeCycle methods (they are not needed for our
component that has its lifecycle managed in Avalon container)
* create NullRequestLogger with empty implementation of log()
* create NCSARequestLogger that logs request information in NCSA
(== apache httpd) format, to do that a portion of NCSARequestLog.log
code from Jetty can be copied (provided Mort Bay Consulting doesn't mind
our relicensing some 45 lines under Apache license)

Thoughts?

Thanks
Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to