Logback-Classic as Logging-Backend w/ Maven Jetty Plugin
--------------------------------------------------------

                 Key: LBSITE-28
                 URL: http://jira.qos.ch/browse/LBSITE-28
             Project: logback-site
          Issue Type: Improvement
            Reporter: Sebastian Davids
            Assignee: Logback dev list


http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
http://logback.qos.ch/faq.html#setup_jetty

You should add the following or something similar to the FAQ:

pom.xml: 

<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
...
  <build>
...
    <plugins>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <configuration>
...
          <systemProperties>
            <systemProperty>
              <name>logback.configurationFile</name>
              <value>./src/etc/logback.xml</value>
            </systemProperty>
          </systemProperties>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${lb.version}</version>
          </dependency>
...
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <properties>
    <lb.version>0.9.15</lb.version>
  </properties>
</project>

If one just adds the dependency on logback-classic the BasicConfigurator will 
be used for Jetty, resulting in a lot of debug statements.

The important part is the systemProperty.

You might want to update the example at 
http://svn.qos.ch/repos/logback-demo/tags/STABLE also.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to