Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Adding a handler so I can get HTTP-access logs for an Orion server

Hi Team,

I am trying to enable HTTP-access logs for Orion. Details are at

If you look at and some of the other documentation, it suggests I need to add an handler to the Jetty server.

Our WebApplication in org.eclipse.orion.server.configurator makes use of a JettyConfigurator to start the server. The JettyConfigurator calls startServer() that eventually calls HttpServerManager.updated().

In this updated() method I can comment out the handler line:

and replace it with what is suggested in the Jetty documentation:
        HandlerCollection handlers = new HandlerCollection();
        ContextHandlerCollection contexts = new ContextHandlerCollection();
        RequestLogHandler requestLogHandler = new RequestLogHandler();
        handlers.setHandlers(new Handler[]{contexts,httpContext,requestLogHandler});
        NCSARequestLog requestLog = new NCSARequestLog("./logs/jetty-yyyy_mm_dd.request.log");

This gives me exactly what I am looking for, but obviously I am hacking the jetty source and need to find the right way to do this, either through an extension point or the like.

Unfortunately I cannot seem to find anything. Any ideas on how to properly add a handler here?


Back to the top