Hi,
I wanted to use the log4j with a configuration file so,
I created an init servlet that configures log4j using "mylog4j.properties" upon startup.
I put "mylog4j.properties" in myapp/WEB-INF/classes and
log4j.jar in myapp/WEB-INF/lib.
but I kept getting the message displayed at the bottom of this post. when I ran out of patience, I deleted tomcat directory and installed a new one. Without any applications in webapps i still got the same stupid message. Help
log4j:WARN No appenders could be found for logger (org.apache.commons.digigester).
log4j:WARN Please initialize the log4j system properly.
Starting service Tomcat-Standalone
Apache Tomcat/4.1.27
-
help with log4j (5 messages)
- Posted by: ahmed tantan
- Posted on: October 09 2003 14:33 EDT
Threaded Messages (5)
- help with log4j by Chetan Shah on October 09 2003 15:37 EDT
- help with log4j by ahmed tantan on October 09 2003 16:16 EDT
-
help with log4j by Mike Spille on October 09 2003 04:27 EDT
-
help with log4j by ahmed tantan on October 09 2003 06:12 EDT
- Different Logs for different applications in the same project by srihari gorrepati on August 06 2004 11:51 EDT
-
help with log4j by ahmed tantan on October 09 2003 06:12 EDT
-
help with log4j by Mike Spille on October 09 2003 04:27 EDT
- help with log4j by ahmed tantan on October 09 2003 16:16 EDT
-
help with log4j[ Go to top ]
- Posted by: Chetan Shah
- Posted on: October 09 2003 15:37 EDT
- in response to ahmed tantan
The message is coming because your log4j configuration file is referring to an appender which log4j is not able to understand.
The problem is with the contents of your log4j configuration file. Can you please copy the contents of the configuration file.
hope this helps -
help with log4j[ Go to top ]
- Posted by: ahmed tantan
- Posted on: October 09 2003 16:16 EDT
- in response to Chetan Shah
Thanks for the quick reply
Here's mylog4j.properties
log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.ConsoleAppender
log4j.appender.R.layout=org.apache.log4j.SimpleLayout
log4j.appender.R1=org.apache.log4j.RollingFileAppender
log4j.appender.R1.File=MDC.log
log4j.appender.R1.MaxFileSize=100KB
log4j.appender.R1.MaxBackupIndex=2
log4j.appender.R1.layout=org.apache.log4j.PatternLayout
log4j.appender.R1.layout.ConversionPattern=%p - [%X{RemoteHost}] - %m%n -
help with log4j[ Go to top ]
- Posted by: Mike Spille
- Posted on: October 09 2003 16:27 EDT
- in response to ahmed tantan
Is it literally "mylog4j.properties"? If so, that might be your problem. The default is "log4j.properties". If you use another name, you have to pass it in on the Java command line as "log4j.configuration=<filename>".
-Mike -
help with log4j[ Go to top ]
- Posted by: ahmed tantan
- Posted on: October 09 2003 18:12 EDT
- in response to Mike Spille
Hi,
Thank you guys, I got it to work. Well, I don't know where I read this but I was told to put log4j.jar in JAVA_HOME\ext\lib. As soon as I took it out of there, Everyting started working. thank you for your help -
Different Logs for different applications in the same project[ Go to top ]
- Posted by: srihari gorrepati
- Posted on: August 06 2004 11:51 EDT
- in response to ahmed tantan
Hi Ahmed:
I have one log file for all our modules in a project and is working successfully. We added one application to this project and has to run independently. For this I need to create another logger and created one.
But the problem is after writing the code, All modules and the new application logging information is going only to one log file depends on the configuration. System is not able to differentiate between the modules and new Application. Can you please suggest in this matter...I can call if you want me to.
Thank You
Hari