tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo Jiménez <ljime...@nacion.co.cr>
Subject RE: Log4j and Tomcat problem
Date Wed, 23 Aug 2006 19:51:54 GMT
Also in order to work with log4j, you have to include this in the WEB-INF/classes directory.

Commons-loggin.properties
Log4j.properties

I include them as a sample.

Regards,
Lorenzo


-----Original Message-----
From: Lou Caudell [mailto:lcaudell@wtceng.com] 
Sent: Wednesday, August 23, 2006 1:08 PM
To: Tomcat Users List
Subject: Re: Log4j and Tomcat problem

pompiuses wrote:
> I'm using Tomcat 5.0.30 running on Ubuntu Linux (6.06).
>
> I've made a small webapp which runs fine under Tomcat on Windows, but on
> Linux I've got a problem with log4j.
>
> I've put "commons-logging-1.1.jar" and "log4j-1.2.13.jar" in the webapp libs
> directory ($CATALINA_HOME/webapps/ROOT/WEB-INF/lib). In the webapp classes
> directory I've put log4j.properties.
>
> The problem is that the webapp won't even run as long as
> "commons-logging-1.1.jar" is in the class path. If I remove it, the webapp
> will run but there's no logging.
>
> Then I tried putting log4j.properties in $CATALINA_HOME/shared/classes and
> $CATALINA_HOME/common/classes, but it still wouldn't log anything.
>
> No error messages is written to system.out (/var/log/tomcat5/catalina.out)
> or any of the Tomcat log files.
>
> My log4j.properties look like this (just prints to the console):
>
> # The log4j configuration file.
> log4j.rootLogger=debug, R
> log4j.appender.R=org.apache.log4j.ConsoleAppender
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%-5p %-30.30c{1} %x - %m%n
>
>
> How can I test if log4j.properties really is in the classpath? Perhaps it's
> missing from the classpath?
>
> Perhaps using the ROOT directory for my webapp is a bad idea?
>
> Any comments and suggestions are welcome :-)
>
>   
Couple of things,
1) Try putting the log4j*.jar in tomcat*\commons\lib and see if it works..
2) You may be missing the jtds*.jar.

- Lou Caudell

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Si usted no es el destinatario indicado en este mensaje o responsable como persona de la entrega
del mensaje, no debe copiar o reenviar este mensaje, por favor notifique al correo infosegura@nacion.com.
 Para más referencia sobre términos importantes relacionados a este correo visite http://www.nacion.com/disclaimer/index_es2.htm

If you are not the addressee indicated in this message (or responsible for delivery of the
message to such person), you may not copy or send this message to anyone, please notify to
infosegura@nacion.com.  Click on the following link for important additional terms relating
to this e-mail http://www.nacion.com/disclaimer/index_en2.htm



Mime
View raw message