Did that, don't see any errors. How exactly does log4j know to configure itself under tomcat, just by dropping the log4j.properties file in the right place???
Shapira, Yoav wrote:
Howdy, Add -Dlog4j.debug=true to your JAVA_OPTS and check the tomcat logs. If log4j runs into errors you'll see them there.
Yoav Shapira Millennium ChemInformatics
war.-----Original Message----- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 2:34 PM To: Tomcat Users List Subject: Re: tomcat and log4j
OK, so I changed the file to /tmp/xxx.log and it still does not show up. Any other suggestions?
Dean
Shapira, Yoav wrote:
Howdy,
You're not going to have file write access to xxx.log from inside a
web-serverEnsure the File parameter for your appender in log4j.properties points to a writeable location.
Yoav Shapira Millennium ChemInformatics
-----Original Message----- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 8:03 PM To: Tomcat Users List Subject: Re: tomcat and log4j
Thanks for responding. I'm just going by what it says in the log4j manual:
"The default log4j initialization is particularly useful in
justenvironments. Under Tomcat 3.x and 4.x, you should place the |log4j.properties| under the |WEB-INF/classes| directory of your web-applications. Log4j will find the properties file and initialize itself. This is easy to do and it works."
I am running jakarta-tomcat-4.1.24 on RH 9 using j2sdk1.4.1_02. I
%m%ndid a jar tvf on my war file, which shows:
[EMAIL PROTECTED] vendor]$ jar tvf build/vendor.war 0 Mon Jun 30 03:52:20 EDT 2003 META-INF/ 110 Mon Jun 30 03:52:20 EDT 2003 META-INF/MANIFEST.MF 0 Wed May 14 01:06:28 EDT 2003 images/ 0 Mon Jun 30 01:48:54 EDT 2003 include/ 0 Mon Jun 30 13:26:16 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 6861 Mon Jun 30 01:48:54 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 1181 Mon Jun 30 01:54:14 EDT 2003 register3.jsp 0 Mon Jun 30 03:52:22 EDT 2003 WEB-INF/ 0 Mon Jun 30 03:52:22 EDT 2003 WEB-INF/classes/ 3526 Mon Jun 30 02:58:14 EDT 2003 WEB-INF/classes/Login.class 7268 Mon Jun 30 03:03:26 EDT 2003 WEB-INF/classes/Register.class 333 Mon Jun 30 03:00:06 EDT 2003 WEB-INF/classes/log4j.properties 0 Mon Jun 30 03:52:22 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 97589 Fri May 16 01:45:42 EDT 2003 WEB-INF/lib/universal-common.jar 12844 Fri Jun 27 03:06:54 EDT 2003 WEB-INF/lib/xxx.jar 352668 Mon Jun 30 03:52:06 EDT 2003 WEB-INF/lib/log4j-1.2.8.jar 1800 Wed May 21 09:53:30 EDT 2003 META-INF/context.xml 496 Wed May 14 02:08:08 EDT 2003 WEB-INF/web.xml
This is what my log4j.properties file looks like: log4j.rootLogger=DEBUG, roll
log4j.appender.roll=org.apache.log4j.RollingFileAppender
log4j.appender.roll.File=xxx.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 -
sayEverything compiles. I've used log4j in non-web apps. I have logstatements
in my servlet, and I cannot find a log file anywhere. What's up with that???
Yoav Shapira wrote:
log4j.jar inHowdy, It does work if you place logj4.properties in WEB-INF/classes and
WEB-INF/lib. If you could please be a bit more explicity when you
--"This
does not seem to be working" perhaps I could help more.
Yoav Shapira
--- "Dean A. Hoover" <[EMAIL PROTECTED]> wrote:
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?
Thanks.
Dean Hoover
-------------------------------------------------------------------
[EMAIL PROTECTED]To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
-
===== Yoav Shapira [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
--------------------------------------------------------------------
intendedcommunication, and may contain information that is confidential,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]
This e-mail, including any attachments, is a confidential business
proprietary and/or privileged. This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else. If you are not the(an)
recipient, please immediately delete this e-mail from your computersystem
and notify the sender. Thank you.
--------------------------------------------------------------------- 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]
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- 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]