Tomcat logges in eclipse everything starting with DEBUG. It doesn't log only its own properties but other stuff allow themselves to log (like:
[localhost-startStop-1] DEBUG o.s.w.c.s.StandardServletEnvironment
or
[localhost-startStop-1] DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver
and many many others).
I want to limit tomcat logging to info or warning. I tried going into the tomcat directory and changing the log level in logging.propertie
from "FINE" to "INFO" to no avail. I even tried to copy the file into eclipse and appending -Djava.util.logging.config.file=$/Servers/Tomcat v7.0 Server at localhost-config/logging.properties} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
but that didn't help either (and of course I cleaned tomcat many times).
Also, in web.xml the only place I have the word 'log' not in comment is
<mime-mapping>
<extension>gph</extension>
<mime-type>application/vnd.flographit</mime-type>
</mime-mapping>
and
<mime-mapping>
<extension>log</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
and my log4j.xml
files are configured with either INFO
or WARNING
, not DEBUG
.
How can I limit the log to INFO
or WARNING
, or even just disallow unnecessary classes to log?
Tomcat uses Juli logging framework, a mix of Java Util Logging and Apache Commons Logging. You can either set the level in the JRE, youre Eclipse is running with ([JRE_DIR]/lib/logging.properties), or you can define your own one, i.e. copy the former into the Tomcat directory and add this to the run configuration:
Eclipse: "Run" -> "Run Configurations" -> select Tomcat to the left -> select tab "Arguments" to the right -> add this to "VM Arguments":
In that file, change these lines:
Thats it.