See the following for hints on how to set up intelligent Log4j configuration:
http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/WEB-INF/sample.web.xml?rev=1.3&content-type=text/x-cvsweb-markup
http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/WEB-INF/sample.log4j.xml?rev=1.2&content-type=text/x-cvsweb-markup
http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/core/util/logging/Log4jInit.java?rev=1.3&content-type=text/x-cvsweb-markup
http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/core/util/logging/Log4jApplicationWatch.java?rev=1.1&content-type=text/x-cvsweb-markup
There is all the stuff you need to have full control over where you put your log4j config file + it enables you to use both properties and xml config files and provides the option to use configureAndWatch or just a regular configure.
Jake
At 03:22 PM 10/23/2002 -0600, you wrote:
By default, log4j attempts to obtain its configuration file from the current classloader using the getResource() call.
The classloader for a web-app retrives classes from the WEB-INF/classes folder; placing the log4j.properties file here is the recommended configuration procedure under tomcat according to the log4j short manual.
You can instruct log4j to retrieve its configuration from another location by using the log4j.configuration system property (see http://jakarta.apache.org/log4j/docs/manual.html for more details), but I wouldn't recommend it. You're probably better off leaving log4j.properties in WEB-INF/classes.
Sean Reilly
Programmer, Point2 Technologies, Inc.
(306) 955-1855
[EMAIL PROTECTED] <mailto:sreilly@;point2.com>
-----Original Message-----
From: Carson, Chuck [mailto:Chuck.Carson@;syrrx.com]
Sent: Wednesday, October 23, 2002 11:30 AM
To: Tomcat Users List
Subject: Help with log4j and log4j.propereties under Tomcat 4.1.2
I am using log4j and have the log4j.jar file located in
$TOMCAT_HOME/webapps/<myapp>/WEB-INF/classes. For some reason, I can
only place the log4j.properties file in the same directory as the jar
file. Is this proper behavior? I would like to keep the log4j.properties
file in WEB-INF/.
Thanks for any help
CC
----------
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please
request a hard-copy version.
--
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>
