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

Thomas Fischer <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <OFB1B5018D.D9DBC51E-ONC1257498.00403494-C1257498.0041191D@seitenbau.net>
> I agree with that.
> But as it's Torque (or commons-logging) which OUTPUT the log messages on 
the
> classes and packages it wants, it should ensure that something could be 
done
> with the Log4j configuration, or guess, or whatever, or at least the 
Torque
> website should have a FAQ which says that this package and this package 
MUST
> have appenders configured, because we're not supposed to know who 
outputs !!

I agree it should be documented what to do. But I still am convinced that 
no library should attempt to configure the logger. Imagine you have some 
twenty libraries and each does some initialisation by guess ...a 
nightmare.
 
> Then, to conclude, TO HAVE TORQUE LOG WORKING :
> 
> - Just put a log4j.properties in your classpath, saying that :
> log4j.category.rootCategory = <whatever>
> log4j.category.org.apache.commons = <whatever>
> log4j.category.org.apache.torque = <whatever>
> <rest of config files>
> 
> - Put a commons-logging.properties in your classpath with these 2 lines 
:
> 
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
> 
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> 
> You need commons-logging and log4j jars (and probably other 
dependencies) to
> make this working, of course.

Thanks a lot, I'll ad that to the documentation.

    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.