With Jetty 7.x you have 2 options.
Both require you to tell Jetty what kind of advanced logger you want to use.
* SLF4J
- java.util.logging -
Set a system property called "org.eclipse.jetty.util.log.class" to "org.eclipse.jetty.util.log.JavaUtilLog" and from there you have all of the standard java.util.logging configuration options to write to a file / roll the log / etc ...
- SLF4J -
You'll want to setup SLF4J, have JettyLog use its SLF4J impl.
The mere existence of slf4j-api.jar in the classpath is enough to trigger this behavior.
Download the slf4j-api.jar of your choice, and put it in ${jetty.home}/lib/ext
Be sure you checkout $ java -jar start.jar --version to see if it will load into the Jetty Classpath (not your webapps)
Then you'll want to worry about how to take the SLF4J produced logging events and route them to a logging impl you like.
For example: you can have SLF4J use log4j to write the logs to disk.
I personally like logback
http://*logback.qos.ch/ opposed to log4j, as it allows me greater log routing control than log4j alone.
(Example: I can route all commons-logging & log4j & java.util.logging & slf4j & stderr & stdout generated logging events to a file controlled by the logback configuration under slf4j)
- Joakim