• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Not able to Use log4j with Richfaces

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27816
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic