[jetty-users] Enabling DEBUG-level logging in embedded Jetty?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-users] Enabling DEBUG-level logging in embedded Jetty?

Jeremy Johnson

 

How can I enable DEBUG-level logging with an embedded instance of Jetty 7.5.4?

 

The documentation at Codehaus (http://docs.codehaus.org/display/JETTY/Debugging) says to "call SystemProperty.set("DEBUG", "true") before calling new org.mortbay.jetty.Server()."

 

I'm not sure what the SystemProperty class is, it doesn't seem to be documented anywhere. I tried System.setProperty(), but that didn't do the trick.

 

Thanks,

Jeremy


_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Enabling DEBUG-level logging in embedded Jetty?

Joakim Erdfelt-9
You are looking at the old Jetty 6.x docs at docs.codehaus.org.

DEBUG logging is just a logging level determined by the logging implementation you choose to use.

* If you use slf4j, then use slf4j's docs for configuring logging level.

* If you use java.util.logging, use the JVM docs.

* If you use the built-in StdErrLog, then there is a pattern to follow.

-D{classref}.LEVEL={level}

Where {classref} is the class reference you want to set the level on, and all sub-class refs.
and {level} is one of the values ALL, DEBUG, INFO, WARN

Example:
-Dorg.eclipse.jetty.LEVEL=INFO  - this will enable INFO level logging for all jetty packages / classes.
-Dorg.eclipse.jetty.io.LEVEL=DEBUG - this will enable DEBUG level logging for IO classes only
-Dorg.eclipse.jetty.servlet.LEVEL=ALL - this will enable ALL logging (trace events, internally ignored exceptions, etc..) for servlet packages.
-Dorg.eclipse.jetty.util.thread.QueuedThreadPool.LEVEL=ALL - this will enable level ALL+ on the specific class only.

--
Joakim Erdfelt

(the people behind jetty and cometd)



On Mon, Feb 13, 2012 at 11:02 AM, Jeremy Johnson <[hidden email]> wrote:

 

How can I enable DEBUG-level logging with an embedded instance of Jetty 7.5.4?

 

The documentation at Codehaus (http://docs.codehaus.org/display/JETTY/Debugging) says to "call SystemProperty.set("DEBUG", "true") before calling new org.mortbay.jetty.Server()."

 

I'm not sure what the SystemProperty class is, it doesn't seem to be documented anywhere. I tried System.setProperty(), but that didn't do the trick.

 

Thanks,

Jeremy


_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users