logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deep Chand <dgisc...@gmail.com>
Subject log4j:WARN No appenders could be found for logger.
Date Mon, 10 Oct 2005 21:27:09 GMT

I'm trying to use Log4J for logging. I get the following error during start up:
log4j:WARN No appenders could be found for logger
log4j:WARN Please initialize the log4j system properly.

After that it goes in some sort of loop. No idea what it is missing.

Below is the configuration details:

log4j-1.2.12.jar is in \common\lib directory. commons-logging.jar is also there.

InitializationServlet which loads on start up has the following code.
I don't see any exceptions in this code.
	    String prefix =  getServletContext().getRealPath("/");
	    String file = prefix+getInitParameter("log4j-init-file");
	    // if the log4j-init-file is not set, then no point in trying
	    if(file != null) {

log4jconfig.xml placed in \WEB-INF\classes directory is as follows:

	<appender name="A1" class="org.apache.log4j.FileAppender">
            <param name="File"   value="D:\dgworld.log" />
            <param name="Append" value="false" />	    	
            <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
	<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern"
		          value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
	<category name="com.dgworld">
	  <priority value="debug" />
  	  <appender-ref ref="A1" />
	   <priority value ="debug" />
   	   <appender-ref ref="STDOUT" />

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message