tags:

views:

271

answers:

2

Hi,

I have an application which runs on tomcat 6.0.20 server on linux ubuntu server.

It generates a huge amount of logs in the catalina.out folder, most of these are generated while using the application, but are not generated by the application.

Some of the logs it generates are given below,

    Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester startElement
FINE: startElement(,,mime-type)
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester startElement
FINE:   Pushing body text '

        '
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester startElement
FINE:   New match='web-app/mime-mapping/mime-type'
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester startElement
FINE:   Fire begin() for CallParamRule[paramIndex=1, attributeName=null, from stack=false]
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester characters
FINE: characters(audio/x-mpeg)
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester endElement
FINE: endElement(,,mime-type)
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester endElement
FINE:   match='web-app/mime-mapping/mime-type'
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester endElement
FINE:   bodyText='audio/x-mpeg'
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester endElement
FINE:   Fire body() for CallParamRule[paramIndex=1, attributeName=null, from stack=false]
Apr 16, 2010 2:55:24 PM org.apache.tomcat.util.digester.Digester endElement
FINE:   Popping body text '

How can I turn them off? This is very important, since this a production application.

Regards, Rohit

+1  A: 

These statements are coming via Java's built-in logger (java.util.logger), it appears. For whatever reason, you have your environment configured to log level "fine" messages. This level is typically used for debug output and yes, you never typically leave it on in production.

If I'm not mistaken, Tomcat configures the Java logger with the file conf/logging.properties. You'll want to edit this in production. Info on what the file means is here: http://java.sun.com/javase/6/docs/technotes/guides/logging/overview.html

But basically you want to replace occurrences of "FINE" with "INFO" in the file.

Sean Owen
+1  A: 

Have already made those changes, but this doesn't seem to be helping,

I have already changed all the properties to SEVER and INFO, but the logs still keep on generating.

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

1catalina.org.apache.juli.FileHandler.level = SEVERE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = SEVERE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = SEVERE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4host-manager.org.apache.juli.FileHandler.level = SEVERE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE
#org.apache.catalina.core.AprLifecycleListener.level=FINE
-- INSERT --                                             
rohitgu