tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Arvesen" <aarve...@eclyptic.com>
Subject RE: Log4j and Tomcat 4.0.3
Date Mon, 05 Aug 2002 16:13:36 GMT
I'm dealing with the same issue right now.  It's addressed in the faq:

http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html

My log4j.properties looked like this:

log4j.rootLogger=WARN,stdout
log4j.logger.com.jags=WARN,stdout
log4j.logger.com.eclyptic.home=ERROR,stdout

I had never assigned "stdout" an appender and layout.  I added two lines and it now works
fine:

log4j.rootLogger=WARN,stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender		# added
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout		# added
log4j.logger.com.jags=WARN,stdout
log4j.logger.com.eclyptic.home=ERROR,stdout


so, basically, you need to apply an appender and a layout to something in the "org.apache.coyote.http11.Http11Protocol"
hierarchy, or just to your rootLogger, and you're good to go. 


-----Original Message-----
From: Dan Lipofsky [mailto:danlip@nuserve.com]
Sent: Monday, August 05, 2002 11:07 AM
To: Tomcat Users List
Subject: Re: Log4j and Tomcat 4.0.3


> log4j:WARN No appenders could be found for logger
> (org.apache.coyote.http11.Http11Protocol).
> log4j:WARN Please initialize the log4j system properly.

Are you calling PropertyConfigurator.configure?
We use tomcat 3.2.4, and have a JDP that runs on startup that calls code
like this

public class Init {
   public static void init() {
        URL url = Init.class.getResource("log4j.properties");
        PropertyConfigurator.configure(url);
   }
}

If the startup JSP doesn't get called we get error messages like yours.
- Dan



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message