tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mélanie langlois <melan...@hotmail.fr>
Subject tomcat not loading log4j properties
Date Thu, 31 May 2007 03:06:42 GMT
Hello,

I'm using tomcat 5.0.28 on windows, and I do not obatin the logs for my 
application. I probably do something wrong in my configuration, but couldn't 
figure out why, even after checking tomcat doics and mailing list.

Here is my configuration:

-in my server.xml, I have the following:
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat_dev">
      <Host appBase="webapps" name="localhost"  autoDeploy="true" 
unpackWARs="true" deployOnStartup="true" >
        <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>

I copied the log4j.jar and commons-looging.jar under tomcat-home/common/lib
I put a log4j.xml under tomcat/common/classes/log4j.properties (see 
root_log4j.properties attached)
I put a log4j.properties under webapp/myapp/WEB_INF/classes/log4j.properties 
(see myapp.properties)

I start tomcat using catalina.bat : catalina start. I can see some output in 
the console. There is aloaso a localhost_date.txt created under log folder, 
but this contains only the servlet logs. Myapp.log and jrc.log are not 
created at all, and I do not see any log from my webapp in the console. 
Also, teh first time I logged a message from my Servlet, I had an error 
saying that there was no log4j property configire. To fix that, I loaded the 
log4j.properties file in my class. This does fix the error, but I can not 
see any logs from my java classes anywhere...

I really don't have any idea of what's happening here, does anyone has an 
idea ?

Thanks,

Mélanie

_________________________________________________________________
Gagnez des écrans plats avec Live.com http://www.image-addict.fr/


Mime
View raw message