Thanks a lot jake it works.

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 1:43 AM
To: Tomcat Users List
Subject: Re: at the tomcat start up...log4j error..


At 05:21 PM 9/10/2004 -0400, you wrote:
>log4j:WARN No appenders could be found for logger
>(org.apache.commons.digester.D
>igester).
>log4j:WARN Please initialize the log4j system properly.
>Starting service Tomcat-Standalone
>
>I am getting the above error as the tomcat starts up, i hav elog4j.jar
under
>commom/lib and log4j.proprties
>under webapps/myapps/WEB-INF/lib... any clue..

Tomcat itself won't see the log4j.properties in your webapp.  There are two
issues here:

1.  Log4j tries to perform autoconfiguration at Tomcat startup and isn't
finding a config file.  The solution here is to put a simple
log4j.properties or log4j.xml file in common/classes

2.  Log4j won't perform automatic configuration for your webapp since the
one in common/lib can't see WEB-INF/classes.  In this case, there are a few
different solutions....
    a.  add a copy of log4j.jar to WEB-INF/lib and your config file to
WEB-INF/classes and autoconfiguration will happen and only affect your
webapp logging.

    b.  perform manual configuration at webapp startup and provide Log4j
with the URL of the config file.  However, keep in mind that this will
configure logging not only for your webapp, but also for any other app that
is using Log4j.  This is because Log4j is global to all apps.  The solution
is to do as described in "a" or do "c" below...

    c.  use a repository selector so that Log4j can be global, but use a
separate logger repository for each application.  This is certainly more
complex than "a", but it is a good option.  See more here...
http://wiki.apache.org/logging-log4j/AppContainerLogging

If you check out the log4j-sandbox code mentioned at that link, make sure
to checkout the 0_3_alpha tag, as there are certain files that are required
that were removed from the HEAD branch because they were moved into
Log4j-1.3 HEAD.

Jake


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


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

Reply via email to