Search code examples
tomcatloggingcatalina.out

catalina.out : ignore specific error message?


I get an error related to/from java-sdk-http-connection-reaper in catalina.out.

1) What is the reason for these errors ?

2) Is there some way to specifically some particular error (like for example the above one) or in general too , from catalina.log ?? Can it be done by changing the log4j configuration or some other logger logging level or asking it to ignore some particular log messages ?


Solution

  • Q> What is the reason for these errors ?
    A> Would be helpful to see the actual error to answer in more detail.

    Generally, catalina.out captures everything your webapp prints to System.out.

    There's also a chance stuff is logged via log4j and ConsoleAppender is used. If this is the case, the configuration is as easy as specifying the following in the log4j.xml:

    <logger name="class.that.needs.to.be.suppressed">
      <level value="off"/>
    </logger>
    

    Otherwise, try modifying $tomcat_home/conf/logging.properties by adding:

    class.that.needs.to.be.suppressed = ERROR