How to disable catalina.out logging? How can I set only error messages to be logged or much better, hot to configure apache not to cause connection closing?
After integrating Tomcat&Apache with mod_jk on Solaris, tomcat logs a warning "server has closed the current connection (-1)" every few seconds when the load increases. This one corresponds to Apache logging a warning "(128)Network is unreachable: connect to listener". This way, catalina.out grows 5M a day.
For Tomcat 4.x, modify the appropriate
Logger element (for the Engine, Host, or Context) to contain the appropriate
verbosity attribute (you probably want
verbosity="0"). See the Tomcat 4.1.x documentation for more information.
If this doesn't provide enough control for you (or, if for some reason this error is reported as a "fatal message"), you can create your own class that implements the
org.apache.catalina.Logger interface and use it to log your messages by specifying its name as the value of the
className attribute of the
To completely turn of logging, simply create "do nothing" methods, or to get more fancy, create
log(...) methods that filter the messages, discarding any that you want to ignore.