Using Log4j with Maven Jetty plugin

No extra configuration is needed. If log4j.xml or log4j.properties is present in the classpath, it is picked up and logs are directed to the specified appender(s). I found http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin#MavenJettyPlugin-Logging overtly complicated and unnecessary. The logs can be redirected to a file by using a suitable appender in log4j.xml:

Leave a Reply

Your email address will not be published. Required fields are marked *