RE: How to enable log4 for use with Tomcat?

2007-01-16 Thread Lisa

Specifying the location of the log4j.xml file in CATALINA_OPTS is ignored. 
It will only pick it up from the classes/ directory.  Ideally I would like
to put it under the conf/ directory but am having no such luck.

I got it to work sort of.  I can not get fileappenders to work.  I am trying
to log all INFO from com.apache.myfaces to $CATALINA_HOME/logs/jsf.info.log
but am having no luck.

any ideas would be appreciated.




Caldarale, Charles R wrote:
 
 From: Lisa [mailto:[EMAIL PROTECTED] 
 Subject: RE: How to enable log4 for use with Tomcat?
 
 yes, but there is no mention about log4j.xml.  What config 
 file in tomcat do I edit to point to a log4j.xml file and
 have it use that for config instead of the .properties file.
 
 Look at the Default Initialization Procedure and Example Configurations
 sections here:
 http://logging.apache.org/log4j/docs/manual.html
 (about 3/4 of the way down).
 
 If you don't want to use the .properties format, remove (or rename) the
 tomcat-juli.jar from Tomcat's bin directory, then specify the location
 of the .xml file in CATALINA_OPTS or JAVA_OPTS (or as a -D parameter if
 running as a Windows service) per the above doc.  However, note this
 comment in the Tomcat docs for log4j:
 
 Note that there are known issues with using this naming convention
 (with square brackets) in log4j XML based configuration files, so we
 recommend you use a properties file as described until a future version
 of log4j allows this convention.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-enable-log4-for-use-with-Tomcat--tf3018241.html#a8402032
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to enable log4 for use with Tomcat?

2007-01-15 Thread Caldarale, Charles R
 From: Lisa [mailto:[EMAIL PROTECTED] 
 Subject: How to enable log4 for use with Tomcat?
 
 Now how do I tell Tomcat to use this jar and to specifiy a 
 log4j.xml file to use for the configuration?

Have you looked at the relevant doc?
http://tomcat.apache.org/tomcat-5.5-doc/logging.html#log4j

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to enable log4 for use with Tomcat?

2007-01-15 Thread Caldarale, Charles R
 From: Lisa [mailto:[EMAIL PROTECTED] 
 Subject: RE: How to enable log4 for use with Tomcat?
 
 yes, but there is no mention about log4j.xml.  What config 
 file in tomcat do I edit to point to a log4j.xml file and
 have it use that for config instead of the .properties file.

Look at the Default Initialization Procedure and Example Configurations
sections here:
http://logging.apache.org/log4j/docs/manual.html
(about 3/4 of the way down).

If you don't want to use the .properties format, remove (or rename) the
tomcat-juli.jar from Tomcat's bin directory, then specify the location
of the .xml file in CATALINA_OPTS or JAVA_OPTS (or as a -D parameter if
running as a Windows service) per the above doc.  However, note this
comment in the Tomcat docs for log4j:

Note that there are known issues with using this naming convention
(with square brackets) in log4j XML based configuration files, so we
recommend you use a properties file as described until a future version
of log4j allows this convention.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]