Humberto,

We encountered some problems/issues on this just this week.  Our
work-around was to create a "log4j.properties" file that has all our
appenders - and not rely on the Torque.properties file at all for
logging.  We initialize Log4j before we call Torque.init() - it looks
like this:

Log log = LogFactory.getLog(this.getClass());  // initialize log4j
log.debug("Initializing Torque.");
Torque.init("Torque.properties");

All you need to ensure is that a file called "log4j.properties" resides
somewhere on your classpath.

-Peter


On Mon, 2002-06-24 at 15:12, Humberto Hernandez Torres wrote:
> Last week I posted a problem about log4j not working with Torque. I debugged
> the torque code and found that the problem is in how Torque determines if it
> needs to initialize Log4J. It looks for any appenders on any category. If it
> finds one it means it has already been initlialized. In my installation it
> finds an appender in org.apache.velocity.* and therefore (wrongly)assumes it
> doesn't have to configure the log4j properties for Torque. I would imagine
> that it should only look for categories under "org.apache.torque" and not
> every single category.
> 
> --
>   Humberto
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



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

Reply via email to