• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to Use log4j with Richfaces  RSS feed

Vikas Taank
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , I am trying to configure log4j for my application which i am developing in Richfaces.
I am getting the following errors once i start the tomcat 6.0.18
log4j:WARN No appenders could be found for logger (org.ajax4jsf.application.DebugLifecycleFactory).
log4j:WARN Please initialize the log4j system properly.

I have put the log4j.jar in lib directory under WEB-INF and the log4j.properties in WEB-INF/classes folder.
Some people said that log4j.properties has to be in the class path and that's what I have done. I have tried to place properties file at various places but still the log4j is not working.
# STDOUT appender
log4j.appender.STDOUT.layout.ConversionPattern=%d %p [%t] %C{1} - %m\n

# use the STDOUT appender. set the level to INFO.
log4j.category.com.devdaily.log4jdemo.Log4JDemo=INFO, STDOUT

Please help me how to make log4j work and get rid of this error.
Any inputs will be higly appreciated.

you can mail me on vikas.taank@gmail.com or else give the solution here itself.
Thanks in Advance

The log4j.properties is as follows;
Tim Holloway
Posts: 18663
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The log4j jar goes into WEB-INF/lib, the logging properties go into WEB-INF/classes, thus everything is in the application's classpath.

Most likely then, your appender definition isn't being seen as a valid and applicable definition.

I use the XML (log4j.xml) definition, so I don't have an exact copy of what you need. Here's mine, though, for what it's worth:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!