Quoting Allistair Crossley <[EMAIL PROTECTED]>:

> > > 4/ The logging suggestion at
> > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/logger.
> html did not work for me. I have log4j.properties in my webapp classes ...
> does this override any other log4j config like in this example?
> 
> I'm going to try adding
> 
> log4j.logger.org.apache.catalina.=debug, STDOUT
> 
> into my webapp log4j and see what that does but first I need my webapp to
> work :)
> 
> If I can be of any help please let me know what you want me to find out..

There are two solutions to avoid having the Log4j config in common/classes be
separate from your own webapp logging:

1.  Include log4j.jar in WEB-INF/lib.  This works because Tomcat implements
servlet-spec recommended classloading behavior where webapps look locally first
to find classes to load before looking to the parent.  So, your app will be
using one instance of Log4j while Tomcat itself will be using another.

2.  Use a repository selector.  This is more involved, but greatly simplified in
Log4j-1.3 (not released yet).  Tomcat could set a repository selector for all
applications to use making solution #1 unnecessary.  To do it on your own, see
(Note that all referenced code supports Log4j-1.2.x, not 1.3 where the design
and useage of repository selectors has changed significantly)...

http://wiki.apache.org/logging-log4j/AppContainerLogging

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to