I’m using Tomcat 6, and this is my logging.properties:
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
.level=FINE
org.apache.catalina.core.ApplicationContext.level = OFF
org.apache.juli.FileHandler.level = ALL
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = mylog.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
On the one hand, Tomcat seems to read this file, as it correctly saves the logfiles with the prefix “mylog” and prints only messages with log-level FINE and above. On the other hand, it keeps on writing log messages like this:
Jun 8, 2010 9:53:30 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error writing messages
ClientAbortException: java.net.SocketException: Broken pipe
I actually wanted to suppress all log messages from this class, as they flood my logfile, and the error is irrelevant for me. So why is the following line ignored?
org.apache.catalina.core.ApplicationContext.level = OFF
Is there any other way to suppress the log output of this class?
org.apache.catalina.core.ApplicationContextis not the name of the logger used in ApplicationContext, it uses the log of a composite: theorg.apache.catalina.core.StandardContext‘s log.–edit:
Maybe it’s because they’re context loggers. Then they need to be configured differently
something like
I’ve not done that before, I’ve never used tomcat’s logging facilities, and there is not much info to find