Did you see any log4j output on the console? BTW, the console is redirected by tomcat.


At 03:15 AM 7/3/2003 -0400, Dean A. Hoover wrote:
I did (see following updated file) and still no log file. Also,
I am deploying using ant. Once I get this working, I don't
really have to restart all of tomcat, do I?

log4j.debug=true

log4j.rootLogger=DEBUG, roll

log4j.appender.roll=org.apache.log4j.RollingFileAppender
log4j.appender.roll.File=/tmp/migrasponder.log
log4j.appender.roll.MaxFileSize=100KB
log4j.appender.roll.MaxBackupIndex=1
log4j.appender.roll.layout=org.apache.log4j.PatternLayout
log4j.appender.roll.layout.ConversionPattern=%d [%t] %-5p %F:%L - %m%n

Dean Hoover

Phillip Qin wrote:

Put this line into your log4j.properties and restart Tomcat.

log4j.debug=true

-----Original Message-----
From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: July 2, 2003 4:04 PM
To: [EMAIL PROTECTED]
Subject: can't get log4j under tomcat working


I want to use log4j inside a tomcat application. According
to the log4j short manual, all I have to do is drop my
log4j.properties file into WEB-INF/classes and then I can
just use it. This does not seem to be working. Can someone
help?

I added a log4.properties file to my .war file. Here's
the toc:

     0 Wed Jul 02 15:59:12 EDT 2003 META-INF/
   110 Wed Jul 02 15:59:10 EDT 2003 META-INF/MANIFEST.MF
     0 Wed May 14 01:06:28 EDT 2003 images/
     0 Wed Jul 02 10:10:36 EDT 2003 include/
     0 Tue Jul 01 15:18:38 EDT 2003 css/
  1210 Wed May 14 01:06:28 EDT 2003 login.jsp
   485 Fri Jun 27 15:32:30 EDT 2003 welcome.jsp
  3008 Wed May 14 01:06:28 EDT 2003 images/email2.png
 15284 Wed May 14 01:06:28 EDT 2003 images/email.jpg
  1678 Mon Jun 30 02:16:40 EDT 2003 register2.jsp
  7020 Wed Jul 02 10:10:36 EDT 2003 include/contactinfo.jspf
  2287 Wed May 14 01:06:28 EDT 2003 contact.html
   435 Fri Jun 27 15:38:58 EDT 2003 index.html
   856 Mon Jun 30 13:25:12 EDT 2003 css/default.css
  1729 Mon Jun 30 01:55:04 EDT 2003 register1.jsp
  1203 Wed Jul 02 10:09:20 EDT 2003 register3.jsp
  1211 Tue Jul 01 02:40:44 EDT 2003 register4.jsp
     0 Wed Jul 02 15:59:12 EDT 2003 WEB-INF/
     0 Wed Jul 02 15:59:12 EDT 2003 WEB-INF/classes/
  3526 Wed Jul 02 15:59:10 EDT 2003 WEB-INF/classes/Login.class
 10418 Wed Jul 02 15:59:10 EDT 2003 WEB-INF/classes/Register.class
   338 Wed Jul 02 15:59:10 EDT 2003 WEB-INF/classes/log4j.properties
     0 Wed Jul 02 15:59:12 EDT 2003 WEB-INF/lib/
 45386 Wed May 14 15:43:32 EDT 2003 WEB-INF/lib/activation.jar
305434 Wed May 14 15:43:32 EDT 2003 WEB-INF/lib/mail.jar
352668 Wed Jun 25 14:53:02 EDT 2003 WEB-INF/lib/log4j-1.2.8.jar
107126 Wed Jul 02 13:56:56 EDT 2003 WEB-INF/lib/universal-common.jar
460792 Wed Jul 02 13:56:58 EDT 2003 WEB-INF/lib/test.jar
 12914 Wed Jul 02 12:26:08 EDT 2003 WEB-INF/lib/migrasponder.jar
  1800 Wed May 21 09:53:30 EDT 2003 META-INF/context.xml
   901 Wed Jul 02 15:15:56 EDT 2003 WEB-INF/web.xml

The log4j.properties file looks like this:

log4j.rootLogger=DEBUG, roll

log4j.appender.roll=org.apache.log4j.RollingFileAppender
log4j.appender.roll.File=/tmp/migrasponder.log
log4j.appender.roll.MaxFileSize=100KB
log4j.appender.roll.MaxBackupIndex=1
log4j.appender.roll.layout=org.apache.log4j.PatternLayout
log4j.appender.roll.layout.ConversionPattern=%d [%t] %-5p %F:%L - %m%n

I using jakarta-tomcat-4.1.24 on RH9. I am not initializing log4j
in any way, since in the "short manual", it says I don't need to.
I have liberally sprinkled log messages around, but I do not see
the log file getting created. Any pointers on how to get this
going?

Dean


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





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


--
Ceki For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp



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



Reply via email to