I found the answer myself
When using jetty-maven-plugin, the value of RequestLogImpl's "fileName"
property is relative to the project's pom.xml .
So for instance, when the Maven project layout is like this:
~~~Begin: Maven project layout~~~
|-pom.xml
|-[src]
| |-....
|
|-[logback-access-config]
| |-logback-access-localhost.xml
|
|-...
~~~End: Maven project layout~~~
... then my correct jetty XML configuration file looks like this:
~~~Begin: jetty XML configuration file~~~
<Configure id="Server" class="org.eclipse.jetty.server.Server">
...
<Set name="handler">
<New id="Handlers"
class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts"
class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="DefaultHandler"
class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>
<!-- add a RequestLogHandler -->
<Item>
<New id="RequestLogHandler"
class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<Ref id="RequestLogHandler">
<Set name="requestLog">
<New id="requestLogImpl"
class="ch.qos.logback.access.jetty.RequestLogImpl">
<!-- fileName's path is relative to pom.xml -->
<Set
name="fileName">logback-access-config/logback-access-localhost.xml</Set>
</New>
</Set>
</Ref>
...
</Configure>
~~~End: jetty XML configuration file~~~
Cheers
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user