Using Log4j with Maven Jetty plugin

Posted by {"name"=>"Palash Ray", "email"=>"paawak@gmail.com", "url"=>"https://www.linkedin.com/in/palash-ray/"} on July 21, 2008 · 1 min read

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: