• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Not able to Use log4j with Richfaces

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;
Saloon Keeper
Posts: 21302
Android Eclipse IDE Tomcat Server Redhat Java 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:
I promise I will be the best, most loyal friend ever! All for this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!