You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eqbal <eq...@yahoo.com> on 2007/01/30 19:17:25 UTC

problem when using log4j within a Tomcat web app

Hi,

I have configured a web application to use log4j for
logging information (using log4j.properties). I am
using the commons logging API calls in my class files.
I am using %F and %L in my pattern layout. When I run
my class file as stand alone in Eclipse I get proper
logging information with the class filename and line
number output to the console. But when I build my web
application war file(using ant) and deploy it to
Tomcat I get a question mark in place of %F and %L. I
do get the method name right (using %M). I searched
the archive for log4j and posted this question there,
but was asked to post here instead. I also searched
the archive for Tomcat but couldn't find anything.
Versions:
Tomcat 5.5.17
log4j 1.2.14
commons-logging 1.0.4
jdk 1.5
struts 1.3.5

Any help is greatly appreciated.

Thanks.


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

---------------------------------------------------------------------
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


RE: problem when using log4j within a Tomcat web app

Posted by Tim Lucia <ti...@yahoo.com>.
I seem to remember I had to upgrade to 1.3 of log4j in order to have the
locator information appear, at least in Chainsaw.  I'm not 100% certain of
this.  But, if you have a newer log4j*.jar in Eclipse, then that might
explain things.

Tim


> -----Original Message-----
> From: Eqbal [mailto:eqbalz@yahoo.com]
> Sent: Tuesday, January 30, 2007 1:17 PM
> To: users@tomcat.apache.org
> Subject: problem when using log4j within a Tomcat web app
> 
> Hi,
> 
> I have configured a web application to use log4j for
> logging information (using log4j.properties). I am
> using the commons logging API calls in my class files.
> I am using %F and %L in my pattern layout. When I run
> my class file as stand alone in Eclipse I get proper
> logging information with the class filename and line
> number output to the console. But when I build my web
> application war file(using ant) and deploy it to
> Tomcat I get a question mark in place of %F and %L. I
> do get the method name right (using %M). I searched
> the archive for log4j and posted this question there,
> but was asked to post here instead. I also searched
> the archive for Tomcat but couldn't find anything.
> Versions:
> Tomcat 5.5.17
> log4j 1.2.14
> commons-logging 1.0.4
> jdk 1.5
> struts 1.3.5
> 
> Any help is greatly appreciated.
> 
> Thanks.
> 
> 
> 
> __________________________________________________________________________
> __________
> Yahoo! Music Unlimited
> Access over 1 million songs.
> http://music.yahoo.com/unlimited
> 
> ---------------------------------------------------------------------
> 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




---------------------------------------------------------------------
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