logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <Phillip....@shareowner.com>
Subject RE: can't get log4j under tomcat working
Date Wed, 02 Jul 2003 20:13:20 GMT
Put this line into your log4j.properties and restart Tomcat.

log4j.debug=true

-----Original Message-----
From: Dean A. Hoover [mailto:dhoover@rochester.rr.com] 
Sent: July 2, 2003 4:04 PM
To: log4j-user@jakarta.apache.org
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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message