On 7/4/06, Eugeny N Dzhurinsky <[EMAIL PROTECTED]> wrote:
On Mon, Jul 03, 2006 at 02:18:13PM -0400, Javier Gonzalez wrote:
> You only have an appender attached to the root logger, and the root
> logger is configured to show only messages of ERROR level and higher.

Right, but for org.apache.commons it is set to DEBUG.

Yes, but the logging events are relayed up the hierachy to the root
logger, and the root logger is ignoring anything that isn't ERROR or
higher. And since your only appender is attached to said root logger,
you only get ERROR or higher messages in your logs.

> A possible fix is configuring the root Logger for DEBUG priority -
> however, this will leave all loggers logging at DEBUG level.

I tried that too - still have seen no logs except logs for my application. I
think it's because my application uses log4j explicitly, and libraries are
using commons logging from Jakarta. May be there is something to do about
using Log4J with commons logging somehow?

That's weird - I have had the opposite problem, httpclient.wire
logging so much info it makes my logs unreadable unless I explicitly
set httpclient.wire at WARN level.

Try adding this to your config:

log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File= <PATH TO DESIRED LOG FILE>
log4j.appender.file.Append=true
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%c] %m %n

and modifying these lines in your config:

log4j.logger.httpclient.wire=DEBUG, file
log4j.logger.org.apache.commons.httpclient=DEBUG, file

and monitor the specified file to see if you get debug messages from
httpclient.wire

--
Javier González Nicolini

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to