Log reduction in Eclipse WTP with Tomcat 7

I am running Tomcat 7 from Eclipse WTP (Juno) and I cannot configure the logging level. It writes everything from debugging that is too meaningful to use (I want it to register from INFO). The logging.properties file is as follows:

handlers =  java.util.logging.ConsoleHandler

.handlers = java.util.logging.ConsoleHandler

.level=INFO

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.  
############################################################

java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+5
source share
3 answers

Adding both of these to the FAQ quoted by Tom Chatt:

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file="${workspace_loc}/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/logging.properties"

, . ${workspace_loc} ; Eclipse . tmp0 tmp1 ; , . , logging.properties, . Project Explorer . Tomcat conf.

, JULI.

Tomcat 8.0 Eclipse Mars. , . ClassNotFound s, , .

, JVM.

+6

, Tomcat 7 Eclipse WTP. logging.properties /src -. . logging.properties /conf Tomcat, . Eclipse WTP "" Tomcat .metadata/.plugins/org.eclipse.wst.server.core/tmp0 logging.properties /conf . .

(, FAQ eclipse.org), , , Tomcat "JULI", - Tomcat, Eclipse WTP, JULI.

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

VM args Tomcat, ClassNotFound. ( , tomcat-juli.jar , , .)

, logging.properties jdk jre/lib. -! , , , Tomcat-in-Eclipse. , , , , Eclipse , :

myapp.mypackage.level=FINE

$JAVAHOME/lib/logging.properties - , .

+5

, tomcat log4j http://tomcat.apache.org/tomcat-7.0-doc/logging.html. tomcat log4j.

log4j $CATALINA_HOME/lib.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">


   <appender name="null" class="org.apache.log4j.varia.NullAppender" />

   <appender name="console" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
    </layout>
</appender>

<category name="org.package.domain">
    <priority value="INFO" />
    <appender-ref ref="console" />
 </category>

 </log4j:configuration>
0

All Articles