I have small main program that fires up a Jetty 9 server. This server is
able to run/deploy any war file supplied to it as a command line argument.
I construct a *logback-access* appender programmatically, give that
appender to an instance of *ch.qos.logback.access.jetty.RequestLogImpl* and
wrap that instance in a *org.eclipse.jetty.server.handler.RequestLogHandler*
that is finally supplied to the jetty server:
handlers.addHandler(webappHandler(contextPath(), warURL()));
handlers.addHandler(requestLogHandler());
server.setHandler(handlers);
Now, the web-application also uses logback, and has those artifacts in its
*WEB_INF/lib* directory inside the war. It appears that the logback-access
configuration in the main program and the logging performed by the webapp
somewhat interfere with eachother. The symptom is that I see nothing in the
request log, so I guess the logging configuration in the webapp "wins", and
overrides the request log configuration in the main program. If I do not
deploy a webapp, but instead just serve some static files, the request log
works as expected, so I believe that my appender is constructed correctly.
Is there any way the logging configuration from the webapp and the request
log configuration from the server can co-exist ?
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user