db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remke Rutgers <Remke.Rutg...@brightalley.nl>
Subject Torque and log4j problems
Date Mon, 06 Jan 2003 14:53:38 GMT
Hello fellow torque-users,

I had great problems getting torque to generate logfiles for my webapp.
I had two webapps, both using torque. One did create logfiles, the other did
After some debugging, I found out that the call to isLoggingConfigured() in
Torque.java returned true for the webapp NOT creating logfiles. 
I removed the other webapp from my tomcat installation, because I feared a
Shutdown tomcat, start tomcat, still no logfiles. The call to
isLoggingConfigured() in Torque.java still returned true.
    protected static boolean isLoggingConfigured()
        Enumeration enum = Category.getRoot().getAllAppenders();

        if (!(enum instanceof NullEnumeration))
            return true;

Apparently there already was an appender attached to the root Category.
Doing step by step debugging and variable inspection, I found out this one
was created by initialize() in Log4JCategoryLog in commons-logging.jar.
Turned out I used different versions of commons-logging.jar in the two
I know, I should have noticed that earlier, but I didn't.

The working version was 1.0.1, the version not working was 1.0.2.

I put version 1.0.1 of commons-logging.jar in both webapps now and it works,
but it feels like a bad trick. 
I think torque logging should work with commons-logging 1.0.2 as well. Or
maybe commons-logging takes an incorrect approach???
Any thoughts on this appreciated.

Btw, the documentation for Log4j version 1.2.7 tells:
This class has been deprecated and replaced by the Logger subclass. It will
be kept around to preserve backward compatibility until mid 2003. 

Are there plans to replace references to Category in torque code?

Remke Rutgers
Technisch Consultant Knowledge & Learning

Bright Alley Knowledge & Learning
Media Park - Sumatralaan 45
Postbus 158 - 1200 AD Hilversum
Web www.brightalley.com
Telefoon direct (035) 6775668
Fax (035) 6774355
E-mail remke.rutgers@brightalley.nl

View raw message