Okay, here is something interesting. I mentioned my problems with log4j.debug 
before, but had to reinstall my laptop (Oracle and Informix were getting in 
each others hair) and before I was back at this point... Anyway.

Sometimes when I set the log4j.debug log4j is not debugging, but I do get log4j 
output within my app.

1) Tomcat 4.1.24 is started using the following internal command (important is 
only the log4j.debug):

"C:/progra~1/jdk1.4.1_01\bin\java" -Dlog4j.debug=true   -
Djava.endorsed.dirs="C:/Progra~1/jakarta-tomcat-4.1.24\common\e
ndorsed" -classpath "C:/progra~1/jdk1.4.1_01\lib\tools.jar;C:/Progra~1/jakarta-
tomcat-4.1.24\bin\bootstrap.jar" -Dcatali
na.base="C:/Progra~1/jakarta-tomcat-4.1.24" -
Dcatalina.home="C:/Progra~1/jakarta-tomcat-4.1.24" -Djava.io.tmpdir="C:/Pro
gra~1/jakarta-tomcat-4.1.24\temp" org.apache.catalina.startup.Bootstrap  start


2) And then the following output is visible in the console (note log4j debug 
output):

INFO: Loading registry information
...
Apache Tomcat/4.1.24
log4j: Trying to find [log4j.properties] using WebappClassLoader
...
INFO: Starting Coyote HTTP/1.1 on port 8080


3) Now I remove the following code from the web.xml of the only context (aside 
from examples) in the web.xml. This codes loads a servlet that force loads a 
log4j configuration.

<servlet>
        <servlet-name>Log4jServlet</servlet-name>
        <servlet-class>org.tbee.servlets.log4j.InitServlet</servlet-class>
        <init-param>
                <param-name>log4j.properties</param-name>
                <param-value>classes/log4j.properties</param-value>
        </init-param>
       <load-on-startup>1</load-on-startup>             
</servlet>


4) And then Tomcat is started again using EXACTLY the same command, resulting 
in the following output:

INFO: Loading registry information
...
Apache Tomcat/4.1.24
INFO: Starting Coyote HTTP/1.1 on port 8080
...

No log4j debug output! Duh! I assume Tomcat uses Commons logging... Could that 
be the problem?

Tom




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

Reply via email to