Log4j error "No appenders could be found for logger"
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, May 19, 2008 03:55 PM

Hello All, I am getting this error log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams). log4j:WARN Please initialize the log4j system properly. the contents of my log4j.properties are # Set the enterprise logger category to FATAL and its only appender to CONSOLE. log4j.logger.s44QATool=INFO, LOGFILE # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=C:\florence\trunk\s44_QATool\s44QATool\s44qatool.log log4j.appender.LOGFILE.Threshold=INFO log4j.appender.LOGFILE.Append=FALSE log4j.appe   More>>

Hello All,

I am getting this error

			
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.

the contents of my log4j.properties are
			
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.s44QATool=INFO, LOGFILE

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=C:\florence\trunk\s44_QATool\s44QATool\s44qatool.log
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.Append=FALSE
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-5p - %m%n


Can you please help in understanding where I'm going wrong here. Thank you.

Ravi    <<Less

Re: Log4j error "No appenders could be found for logger"

Posted By:   Anonymous  
Posted On:   Thursday, June 19, 2008 02:03 PM

this is because your log4j is not configured properly with the log4j.properties you passed

check if you have log4j.properties at root level of the class folder.
Or call at the initialization of u r program

org.apache.log4j.PropertyConfigurator.configure("log4j.properties");
About | Sitemap | Contact