Tomcat application Too many logs

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

It generates a huge number of logs in the catalina.out folder, most of them are generated when using the application, but not generated by the application.

Some of the magazines you create are listed 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 disable them? This is very important as it is a production application.

Regards, Rohit

+6
java logging tomcat6
source share
4 answers

These statements come through the built-in Java log (java.util.logger), it appears. For some reason, you’ve got your environment set up to log β€œfine” level messages. This level is usually used to output debugging and yes, you never leave it in the production process.

If I'm not mistaken, Tomcat sets up a Java logger with the conf/logging.properties . You want to edit this during production. Information on what the file means: http://java.sun.com/javase/6/docs/technotes/guides/logging/overview.html

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

+2
source share

I had this problem when logging.properties also has .level = INFO.

The problem turned out to be that one of my shared libraries has logging.properties (and this set .level = FINEST).

I fixed the problem by editing the .properties catalogs and making sure that the directory containing logging.properties was the first in the shared.loader class path.

+2
source share

These changes have already been made, but it doesn't seem to help,

 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 -- 
+1
source share

RUN \ Tomcat 8.0 \ bin \ Tomcat8w.exe On the registration tab, change the stdout redirect to empty "; (by default it is" auto ")

0
source share

All Articles