views:

94

answers:

2

In one of codes I am using Jetty. I am using the Jetty jar and imports the Classes from my Java code.

Jetty's default log level is INFO if not configured specifically. We can enable DEBUG mode by code. The logger seems to be a log4j one.

org.mortbay.log.Logger jettyLogger = org.mortbay.log.Log.getLog();
jettyLogger.setDebugEnabled(true);

Assume I haven't added this to the code. And now I want to enable logging by some other method. Can I do this using a log4j configuration?

+1  A: 

Here's the Jetty documentation page on how to use it's logger.

You should just be able to use a standard log4j.properties file if you're using log4j as your logging implementation

Glen
A: 

Add this to your log4j.xml file

<category name="org.mortbay">
   <priority value="debug" />
</category>
Chris Nava