db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: Log4J + Torque ... gonna drive me mad.
Date Fri, 01 Aug 2008 11:51:01 GMT
> 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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message