2

I develop a Vaadin project in Eclipse that I start through Tomcat 6 which gets started directly by Eclipse. Tomcat prints an enormous amount of log messages though on each start which makes it hard to see the output of my own Application. I have already replaced all log levels in tomcat6/conf/logging.properties by WARNING (e.g. java.util.logging.ConsoleHandler.level = WARNING) but I still get many INFO messages. How can I turn this off or restrict the log messages to WARNING?

An example of the messages

Okt 26, 2012 12:16:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.24.
Okt 26, 2012 12:16:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Okt 26, 2012 12:16:36 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:saim' did not find a matching property.
Okt 26, 2012 12:16:37 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Okt 26, 2012 12:16:37 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Okt 26, 2012 12:16:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 879 ms
Okt 26, 2012 12:16:37 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Okt 26, 2012 12:16:37 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Okt 26, 2012 12:16:37 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Okt 26, 2012 12:16:37 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Okt 26, 2012 12:16:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 568 ms
Konrad Höffner
  • 195
  • 1
  • 9

1 Answers1

0

Check out ${catalina.base}/conf/logging.properties. This is where the logging levels for tomcat are set.

You probably want to crank it up to WARN from INFO / FINE.

More info: http://tomcat.apache.org/tomcat-6.0-doc/logging.html

Jason Floyd
  • 1,672
  • 1
  • 13
  • 17
  • You might also consider adding custom logging to your application so it goes to a separate file. – Jason Floyd Oct 27 '12 at 18:18
  • But that's exactly what I wrote: "I have already replaced all log levels in tomcat6/conf/logging.properties by WARNING". – Konrad Höffner Oct 29 '12 at 09:58
  • Wow, how did I miss that. Sorry. Have you considered adding a custom log for your application? – Jason Floyd Oct 29 '12 at 17:47
  • I am using this approach: https://www.kubos.cz/2019/07/05/no-startup-logs-tomcat-Eclipse. What you are missing is passing path to the logging.properties. You can fix it that by adding -Djava.util.logging.config.file=path/logging.properties into Run configurations->Arguments->VM arguments. – Jaroslav Kuboš Aug 05 '19 at 07:45