You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dmitry S. Kravchenko" <di...@vsetech.ru> on 2007/12/05 09:40:39 UTC

How to enable logging correctly in Tomcat 5.5?

Hi!

I'm switched to Tomcat 5.5 from Tomcat 4 and now I cant understand, how to
enable logging.

I want the following thins to be logged:
1) Invalid URLs
2) my exceptions, 
3) test printouts and etc. 

How to do it?

I have tried to place logger directive within host tag within server.xml
file. I have tried to place logging.properties file within WEB-INF folder.
But nothing helped.

For example, now I have two applications (test02 and test04) with the
following logging.properties file

<<<
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = test02.
#test04 here for other application

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
>>>

In the case of first application a have working servlets, but no data in log
file (it created but remains empty).

In the case of second application a have empty response from server (no
servlet reaction) and a log file filled with general messages (no errors).

How to correct this problem?

Thanks.


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


RE: How to enable logging correctly in Tomcat 5.5?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Dmitry S. Kravchenko [mailto:dims@vsetech.ru] 
> Subject: How to enable logging correctly in Tomcat 5.5?
> 
> I have tried to place logger directive within host tag within 
> server.xml file.

<Logger> elements are not used in Tomcat 5.5 and above, as documented
here:
http://tomcat.apache.org/tomcat-5.5-doc/logging.html

> I have tried to place logging.properties file within 
> WEB-INF folder.

Try putting it in WEB-INF/classes, not WEB-INF itself.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org