You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Dan Lipofsky <da...@nuserve.com> on 2002/09/20 02:37:14 UTC

configuring log-examples.war

I am trying to use the log taglib, and I am having trouble
getting the examples to work.  It seems that when
log-examples.war unpacks it sets up WEB-INF exactly
as described in the docs, but I still get:

log4j:ERROR No appenders could be found for category (root).
log4j:ERROR Please initialize the log4j system properly.

>From http://jakarta.apache.org/taglibs/doc/log-doc/index.html :
My own personal preference is just to put a log4j.properties file
in the WEB-INF/classes directory and for that to have your log4j
configuration. Then without any special servlets or initialisation
code log4j will correctly initialise itself.

There is a log4j.properties in WEB-INF and WEB-INF/classes.
What am I doing wrong?  I tried with tomcat 3.2.4 and 4.0.4.  I got
the log tablib from the nightly build (jakarta-taglibs-20020918.tar).
I couldn't find any binaries of the release versions.

OK, so I did a little more research and found
I could get it to work like this:

export
CATALINA_OPTS="-Dlog4j.debug -Dlog4j.configuration=file:/opt/home/danlip/tom
cat4.0.4/webapps/log-examples/WEB-INF/log4j.properties"

So maybe the doc is just wrong.  But I still don't like this
solution because it defines 1 prop file for all apps.

Thanks,
Dan



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>