I’m running a java webapp with a simple mvn jetty:run, using the latest jetty plugin, but I can’t seem to find a way to tell jetty to output DEBUG messages to console (for the embedded jetty instance, not the plugin itself). It’s currently outputting only WARN and INFO messages. I’ve tried setting -DDEBUG and -DVERBOSE, but they don’t do anything. I’ve already had a look at the documentation, but it doesn’t seem to cover this.
I’m running a java webapp with a simple mvn jetty:run , using the latest
Share
Update: OK, I finally got things working and here is what I did.
My understanding is that Jetty 7 doesn’t have any dependencies on a particular logging framework, even for the JSP engine since Jetty 7 uses the JSP 2.1 engine. So you can use any logging framework. Here I will use logback.
First add
logback-classicas dependency in the plugin and set thelogback.configurationFilesystem property to point on a configuration file:Then add a
src/etc/logback.xmlconfiguration file. Below a minimal configuration:With this setup, jetty will output DEBUG messages:
Resources: