Re: Log4J + Torque ... gonna drive me mad.

Alvaro Coronel <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
This deserves to be easily accessible as an entry in Torque's web page.

I wonder how many fellow torque users are putting up with non-configured log4j babble. They would all love to know this. I know I do.

By the way thank you very much everyone involved for clarifying this so much.

Sincerely,
Álvaro

--- On Thu, 7/31/08, Thomas Fischer <[email protected]> wrote:
From: Thomas Fischer <[email protected]>
Subject: Re: Log4J + Torque ... gonna drive me mad.
To: "Apache Torque Users List" <[email protected]>
Date: Thursday, July 31, 2008, 1:24 PM

> ...
> I just added this to log4j.properties :
> 
> log4j.category.rootCategory = ALL, org.apache.torque
> log4j.category.org.apache.commons = ALL, org.apache.torque
> 
> THIS IS WORKING !
> 
> But it still think that's a Torque/commons-logging bug, whih is not
> correctly handling Log4j config.

I have a different opinion about this. Torque does neither initialize 
log4j nor commons-logging. It is up to the user to do this. If you don't 
initialize logging, the standard configuration is used. This is the 
intended behaviour.

Unfortunately for you, the standard configuration for commons-logging is 
to use log4j if it is in the classpath, and the standard configuration for 
log4j is to complain if it is not initialized. There is nothing Torque can 
do about this.

I'm not an expert in log4j, but it seems that if you can add something to 
your log4j.properties which makes log4j work as you want to, then the 
previous log4j was wrong, and now you got it right.

     Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.