• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Not able to Use log4j with Richfaces

 
Greenhorn
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=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
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 [email protected] or else give the solution here itself.
Thanks in Advance

The log4j.properties is as follows;
 
Saloon Keeper
Posts: 28486
210
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:
 
expectation is the root of all heartache - shakespeare. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic