Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat Application Generating too many logs

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

like image 432
sesmic Avatar asked Apr 16 '10 16:04

sesmic


People also ask

Is it safe to delete tomcat logs?

Answer. Yes, you can delete older Tomcat . txt logs if they are taking up too much room. I would recommend keeping recent ones in the case any recent issues need to be diagnosed.

How do I change the logging level in tomcat?

A handler's log level threshold is INFO by default and can be set using SEVERE , WARNING , INFO , CONFIG , FINE , FINER , FINEST or ALL .

Does tomcat use log4j by default?

Apache Tomcat. Log4j may be used as the logging framework for Apache Tomcat. This support is implemented automatically by including the log4j-api, log4j-core, and log4j-appserver jars in the boot classpath.


1 Answers

I had this issue when logging.properties has .level=INFO as well.

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

I fixed the issue by editing catalina.properties and making sure a directory containing logging.properties was first in the shared.loader classpath.

like image 98
Peter Jamieson Avatar answered Oct 27 '22 20:10

Peter Jamieson