Comment désactiver les messages de débogage?

je travaille sur une simple application de bureau (pas webapp).

Voici mon log4j.properties :

log4j.rootCategory=INFO, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L $$$$ %m%n

log4j.logger.org.springframework=ERROR,stdout

comme vous pouvez le voir, afin d'éliminer les messages de journalisation à ressort de la console, j'ai essayé cette solution:

journal désactivant le ressort, pour avoir des journaux lisibles

quand j'appelle Logger log4j à partir de mon code, les messages de journalisation sont conformes au modèle spécifié ci-dessus (qui est bonne).

cependant, la mauvaise partie est - j'arrive toujours aux messages de niveau de débogage de la console depuis le printemps... ils ressemblent ici: impossible de désactiver les messages de journalisation

Et ils ont un motif différent. Comme s'ils ignorent mes paramètres.

j'ai aussi essayé d'appliquer les suggestions que j'ai trouvées ici:

https://spring.io/blog/2009/12/04/logging-dependencies-in-spring

dans mon fichier pom:

    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
        <scope>runtime</scope>
    </dependency>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>3.2.0.RELEASE</version>
</dependency>

et pas de SLF4J. Cette option a été mentionnée dans le lien ci-dessus comme une option valide, si Je ne me trompe pas.

Que pourrais-je manquer ici?

sortie avec-Dlog4j.debug=true

log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@172aa3f.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@172aa3f class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@172aa3f.
log4j: Using URL [file:/C:/eclipse-workspace/workflow/target/classes/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL file:/C:/eclipse-workspace/workflow/target/classes/log4j.properties
log4j: Parsing for [root] with value=[INFO, stdout].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %5p %t %c{2}:%L $$$$ %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing for [org.springframework] with value=[ERROR,stdout].
log4j: Level token is [ERROR].
log4j: Category org.springframework set to ERROR
log4j: Parsing appender named "stdout".
log4j: Appender "stdout" was already parsed.
log4j: Handling log4j.additivity.org.springframework=[null]
log4j: Finished configuring.
23:12:42.763 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
23:12:42.768 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
23:12:42.769 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
23:12:42.769 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
23:12:42.772 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7badec: startup date [Thu Feb 13 23:12:42 EST 2014]; root of context hierarchy
23:12:42.809 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
23:12:42.819 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring-module.xml]
23:12:42.832 [main] DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
23:12:42.852 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
23:12:42.857 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://cxf.apache.org/schemas/configuration/http-conf.xsd=schemas/configuration/http-conf.xsd, http://cxf.apache.org/configuration/parameterized-types=schemas/configuration/parameterized-types.xsd, http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd=schemas/xmldsig-core-schema.xsd, http://www.springframework.org/schema/security/spring-security-3.0.3.xsd=org/springframework/security/config/spring-security-3.0.3.xsd, http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-aop-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd, http://www.w3.org/2006/07/ws-policy.xsd=schemas/ws-policy-200607.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://schemas.xmlsoap.org/ws/2004/08/addressing=schemas/wsdl/addressing.xsd, http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.xsd=org/springframework/security/config/spring-security-2.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://schemas.xmlsoap.org/wsdl/=schemas/wsdl/wsdl.xsd, http://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://schemas.xmlsoap.org/wsdl/http/=schemas/wsdl/http.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd, http://cxf.apache.org/schemas/configuration/parameterized-types.xsd=schemas/configuration/parameterized-types.xsd, http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.4.xsd=org/springframework/security/config/spring-security-2.0.4.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd=schemas/wsdl/wsdl.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://cxf.apache.org/schemas/ws/addressing.xsd=schemas/ws-addr-conf.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://cxf.apache.org/schemas/wsdl/http-conf.xsd=schemas/wsdl/http-conf.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.w3.org/2001/xml.xsd=schemas/xml.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.2.xsd, http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.w3.org/2007/02/ws-policy.xsd=schemas/ws-policy-200702.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://cxf.apache.org/schemas/policy.xsd=schemas/policy.xsd, http://schemas.xmlsoap.org/ws/2004/09/policy/ws-policy.xsd=schemas/ws-policy-200409.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd=org/springframework/oxm/config/spring-oxm-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/security/spring-security-3.1.xsd=org/springframework/security/config/spring-security-3.1.xsd, http://cxf.apache.org/schemas/configuration/cxf-beans.xsd=schemas/configuration/cxf-beans.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://cxf.apache.org/schemas/core.xsd=schemas/core.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://cxf.apache.org/schemas/configuration/security.xsd=schemas/configuration/security.xsd, http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://cxf.apache.org/schemas/configuration/soap.xsd=schemas/configuration/soap.xsd, http://www.springframework.org/schema/security/spring-security-2.0.2.xsd=org/springframework/security/config/spring-security-2.0.2.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://cxf.apache.org/schemas/jaxws.xsd=schemas/jaxws.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd=org/springframework/oxm/config/spring-oxm-3.1.xsd, http://cxf.apache.org/schemas/simple.xsd=schemas/simple.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-3.1.xsd, http://www.springframework.org/schema/security/spring-security-3.0.xsd=org/springframework/security/config/spring-security-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.2.xsd}
23:12:42.858 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.2.xsd
23:12:42.890 [main] DEBUG o.s.b.f.x.DefaultBeanDefinitionDocumentReader - Loading bean definitions
23:12:42.898 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [database/spring-datasource.xml]
23:12:42.899 [main] DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
23:12:42.901 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
23:12:42.911 [main] DEBUG o.s.b.f.x.DefaultBeanDefinitionDocumentReader - Loading bean definitions
.......................

sortie avec-Dorg.Apache.commun.journalisation.diagnostic.dest=STDOUT

[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Extension directories (java.ext.dir): null
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Application classpath (java.class.path): C:eclipse-workspaceworkflowtargetclasses;C:eclipse-workspaceidm-authentication-servicetargetclasses;C:Usersjsmith.m2repositorycomlnidmproductidm-product-service.0-SNAPSHOTidm-product-service-1.0-SNAPSHOT.jar;C:Usersjsmith.m2repositorycomlnidmserviceidm-service.0-SNAPSHOTidm-service-1.0-SNAPSHOT.jar;C:Usersjsmith.m2repositorycomlnidmdomainidm-internal-api.0-SNAPSHOTidm-internal-api-1.0-SNAPSHOT.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-databinding-xmlbeans.7.6cxf-rt-databinding-xmlbeans-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-api.7.6cxf-api-2.7.6.jar;C:Usersjsmith.m2repositoryorgcodehauswoodstoxwoodstox-core-asl.2.0woodstox-core-asl-4.2.0.jar;C:Usersjsmith.m2repositorywsdl4jwsdl4j.6.3wsdl4j-1.6.3.jar;C:Usersjsmith.m2repositoryorgapachexmlbeansxmlbeans.6.0xmlbeans-2.6.0.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-core.7.6cxf-rt-core-2.7.6.jar;C:Usersjsmith.m2repositorycomsunxmlbindjaxb-impl.2.6jaxb-impl-2.2.6.jar;C:Usersjsmith.m2repositoryorgapachewsxmlschemaxmlschema-core.0.3xmlschema-core-2.0.3.jar;C:Usersjsmith.m2repositoryorgapachegeronimospecsgeronimo-javamail_1.4_spec.7.1geronimo-javamail_1.4_spec-1.7.1.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-frontend-simple.7.6cxf-rt-frontend-simple-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-bindings-soap.7.6cxf-rt-bindings-soap-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-databinding-jaxb.7.6cxf-rt-databinding-jaxb-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-frontend-jaxws.7.6cxf-rt-frontend-jaxws-2.7.6.jar;C:Usersjsmith.m2repositoryxml-resolverxml-resolver.2xml-resolver-1.2.jar;C:Usersjsmith.m2repositoryasmasm.3.1asm-3.3.1.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-bindings-xml.7.6cxf-rt-bindings-xml-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-ws-addr.7.6cxf-rt-ws-addr-2.7.6.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-ws-policy.7.6cxf-rt-ws-policy-2.7.6.jar;C:Usersjsmith.m2repositoryorgapacheneethineethi.0.2neethi-3.0.2.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-transports-http.7.6cxf-rt-transports-http-2.7.6.jar;C:Usersjsmith.m2repositoryorgcodehauswoodstoxwoodstox-core-lgpl.2.0woodstox-core-lgpl-4.2.0.jar;C:Usersjsmith.m2repositoryjavaxxmlstreamstax-api.0-2stax-api-1.0-2.jar;C:Usersjsmith.m2repositoryorgcodehauswoodstoxstax2-api.1.1stax2-api-3.1.1.jar;C:Usersjsmith.m2repositoryorgapachecxfcxf-rt-ws-security.7.6cxf-rt-ws-security-2.7.6.jar;C:Usersjsmith.m2repositorynetsfehcacheehcache-core.5.1ehcache-core-2.5.1.jar;C:Usersjsmith.m2repositoryorgapachewssecuritywss4j.5.8wss4j-1.5.8.jar;C:Usersjsmith.m2repositoryorgapachesantuarioxmlsec.4.3xmlsec-1.4.3.jar;C:Usersjsmith.m2repositoryxalanxalan.7.1xalan-2.7.1.jar;C:Usersjsmith.m2repositoryxalanserializer.7.1serializer-2.7.1.jar;C:Usersjsmith.m2repositorydom4jdom4j.6.1dom4j-1.6.1.jar;C:Usersjsmith.m2repositoryxml-apisxml-apis.0.b2xml-apis-1.0.b2.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-web.2.4.RELEASEspring-web-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryaopallianceaopalliance.0aopalliance-1.0.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-beans.2.4.RELEASEspring-beans-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-tx.2.4.RELEASEspring-tx-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-orm.2.4.RELEASEspring-orm-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-oxm.2.4.RELEASEspring-oxm-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-test.2.4.RELEASEspring-test-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-mock.0.8spring-mock-2.0.8.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-support.0.8spring-support-2.0.8.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-webmvc.2.4.RELEASEspring-webmvc-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-aspects.2.4.RELEASEspring-aspects-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgaspectjaspectjweaver.7.2aspectjweaver-1.7.2.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-context-support.2.4.RELEASEspring-context-support-3.2.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgapachexbeanxbean-spring.8xbean-spring-2.8.jar;C:Usersjsmith.m2repositoryorgspringframeworksecurityspring-security-core.1.4.RELEASEspring-security-core-3.1.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworksecurityspring-security-web.1.4.RELEASEspring-security-web-3.1.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworksecurityspring-security-config.1.4.RELEASEspring-security-config-3.1.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworksecurityspring-security-taglibs.1.4.RELEASEspring-security-taglibs-3.1.4.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworksecurityspring-security-acl.1.4.RELEASEspring-security-acl-3.1.4.RELEASE.jar;C:Usersjsmith.m2repositorycomjhlabsimagingBLSimaging-BLS.jar;C:Usersjsmith.m2repositorycommons-configurationcommons-configuration.6commons-configuration-1.6.jar;C:Usersjsmith.m2repositorycommons-collectionscommons-collections.2.1commons-collections-3.2.1.jar;C:Usersjsmith.m2repositorycommons-digestercommons-digester.8commons-digester-1.8.jar;C:Usersjsmith.m2repositorycommons-beanutilscommons-beanutils.7.0commons-beanutils-1.7.0.jar;C:Usersjsmith.m2repositorycommons-beanutilscommons-beanutils-core.8.0commons-beanutils-core-1.8.0.jar;C:Usersjsmith.m2repositorycommons-loggingcommons-logging.1.1commons-logging-1.1.1.jar;C:Usersjsmith.m2repositorycommons-langcommons-lang.3commons-lang-2.3.jar;C:Usersjsmith.m2repositoryorgslf4jslf4j-api.7.5slf4j-api-1.7.5.jar;C:Usersjsmith.m2repositoryorgmockitomockito-core.9.5mockito-core-1.9.5.jar;C:Usersjsmith.m2repositoryorghamcresthamcrest-core.1hamcrest-core-1.1.jar;C:Usersjsmith.m2repositoryorgobjenesisobjenesis.1objenesis-2.1.jar;C:Usersjsmith.m2repositoryorghamcresthamcrest-library.3hamcrest-library-1.3.jar;C:Usersjsmith.m2repositoryjaxenjaxen.1.4jaxen-1.1.4.jar;C:Usersjsmith.m2repositoryorgspringmodulesspring-modules-jakarta-commons"151930920".8spring-modules-jakarta-commons-0.8.jar;C:Usersjsmith.m2repositorycommons-validatorcommons-validator.1.4commons-validator-1.1.4.jar;C:Usersjsmith.m2repositorycommons-chaincommons-chain.1commons-chain-1.1.jar;C:Usersjsmith.m2repositoryjavaxportletportlet-api.0portlet-api-1.0.jar;C:Usersjsmith.m2repositorymyfacesmyfaces-api.1.0myfaces-api-1.1.0.jar;C:Usersjsmith.m2repositorycommons-codeccommons-codec.3commons-codec-1.3.jar;C:Usersjsmith.m2repositorycommons-elcommons-el.0commons-el-1.0.jar;C:Usersjsmith.m2repositorycommons-fileuploadcommons-fileupload.0commons-fileupload-1.0.jar;C:Usersjsmith.m2repositoryorooro.0.8oro-2.0.8.jar;C:Usersjsmith.m2repositoryjavaxservletjstl.1.2jstl-1.1.2.jar;C:Usersjsmith.m2repositoryorgslf4jjcl-over-slf4j.7.5jcl-over-slf4j-1.7.5.jar;C:Usersjsmith.m2repositoryorgslf4jjul-to-slf4j.7.5jul-to-slf4j-1.7.5.jar;C:Usersjsmith.m2repositorychqoslogbacklogback-classic.0.13logback-classic-1.0.13.jar;C:Usersjsmith.m2repositorychqoslogbacklogback-core.0.13logback-core-1.0.13.jar;C:Usersjsmith.m2repositorychqoslogbacklogback-access.0.13logback-access-1.0.13.jar;C:eclipse-workspaceidm-verification-servicetargetclasses;C:Usersjsmith.m2repositoryjunitjunit.4junit-4.4.jar;C:Usersjsmith.m2repositorylog4jlog4j.2.17log4j-1.2.17.jar;C:Usersjsmith.m2repositorycagrimoirelog-annotations.0log-annotations-1.0.jar;C:Usersjsmith.m2repositoryorgaspectjaspectjrt.6.9aspectjrt-1.6.9.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-jdbc.2.0.RELEASEspring-jdbc-3.2.0.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-core.2.0.RELEASEspring-core-3.2.0.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-context.2.0.RELEASEspring-context-3.2.0.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-aop.2.0.RELEASEspring-aop-3.2.0.RELEASE.jar;C:Usersjsmith.m2repositoryorgspringframeworkspring-expression.2.0.RELEASEspring-expression-3.2.0.RELEASE.jar;C:Usersjsmith.m2repositorymysqlmysql-connector-java.1.9mysql-connector-java-5.1.9.jar;C:Usersjsmith.m2repositorycomgoogleguavaguava.0.1guava-16.0.1.jar;C:Usersjsmith.m2repositoryorgapachecommonscommons-lang3.2.1commons-lang3-3.2.1.jar
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Class org.apache.commons.logging.LogFactory was loaded via classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Ancestry of classloader which loaded org.apache.commons.logging.LogFactory is sun.misc.Launcher$AppClassLoader@26290774 == 'sun.misc.Launcher$AppClassLoader@1912a56'
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Ancestry of classloader which loaded org.apache.commons.logging.LogFactory is ClassLoader tree:sun.misc.Launcher$AppClassLoader@26290774 (SYSTEM)  --> sun.misc.Launcher$ExtClassLoader@24291903 --> BOOT
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] BOOTSTRAP COMPLETED
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] LogFactory implementation requested for the first time for context classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] sun.misc.Launcher$AppClassLoader@26290774 == 'sun.misc.Launcher$AppClassLoader@1912a56'
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] ClassLoader tree:sun.misc.Launcher$AppClassLoader@26290774 (SYSTEM)  --> sun.misc.Launcher$ExtClassLoader@24291903 --> BOOT
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] No properties file of name 'commons-logging.properties' found.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] Looking for system property [org.apache.commons.logging.LogFactory] to define the LogFactory subclass to use...
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] No system property [org.apache.commons.logging.LogFactory] defined.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] Looking for a resource file of name [META-INF/services/org.apache.commons.logging.LogFactory] to define the LogFactory subclass to use...
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP]  Creating an instance of LogFactory class org.apache.commons.logging.impl.SLF4JLogFactory as specified by file 'META-INF/services/org.apache.commons.logging.LogFactory' which was present in the path of the context classloader.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] Loaded class org.apache.commons.logging.impl.SLF4JLogFactory from classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] Created object org.apache.commons.logging.impl.SLF4JLogFactory@14185653 to manage classloader sun.misc.Launcher$AppClassLoader@26290774
09:55:35.705 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
09:55:35.710 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
09:55:35.711 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
09:55:35.711 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
09:55:35.714 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1d7999e: startup date [Fri Feb 14 09:55:35 EST 2014]; root of context hierarchy
22
demandé sur Community 2014-02-13 01:05:03

2 réponses

Printemps utilise commons-logging qui détecte automatiquement la structure de journalisation à utiliser. Il y a plusieurs façons de accorder quel cadre de journalisation sera choisi de sorte que la première chose à faire est de s'assurer que commons-logging se lie à log4j.

pour ce faire, démarrez votre application avec un indicateur supplémentaire -Dorg.apache.commons.logging.diagnostics.dest=STDOUT qui affichera le résultat du processus de découverte.

commons-logging délégué à log4j

vous devez maintenant vous assurer que log4j est initialisé avec la configuration attendue. Par défaut, log4j recherche un fichier log4j.xml à la racine de classpath et les retombées sur log4j.properties s'il n'en trouve pas. Il est possible que l'une des bibliothèques que vous utilisez possède (à tort) un fichier log4j.xml à la racine.

pour déboguer log4j, Lancez à nouveau votre application avec un drapeau supplémentaire -Dlog4j.debug=true . Ceci produira les loggers exacts et les emplacement du fichier de configuration.

commons-logging ne pas déléguer à log4j

si commons-logging ne délègue pas à log4j, cela signifie qu'un autre cadre d'enregistrement est impliqué. Le scénario le plus courant est que votre application est livrée avec jcl-over-slf4j.jar , un remplaçant de commons-logging qui utilise slf4j en arrière-plan.

dans ce scénario, utilisations de printemps commons-logging qui est configuré pour déléguer à slf4j . Donc, essentiellement, le ressort utilise slf4j . Mais slf4j est une façade de diagraphie simple et a besoin une liaison à un cadre réel.

DEPUIS 1.6.0 Si aucune liaison n'est trouvé sur le chemin de classe, puis SLF4J par défaut à un pas d'opération de mise en œuvre.

une fois que vous avez trouvé la bibliothèque de reliure (il pourrait être logback ou log4j par exemple), vérifiez la configuration du cadre de journalisation auquel slf4j est lié.

Dans ce cas particulier, vous avez probablement logback dans votre classpath. Comme il s'agit d'une pure implémentation de slf4j , il n'a pas besoin d'une bibliothèque de liaison et il se connecte dans debug si aucun fichier de configuration n'est fourni, ce qui correspond en fait à votre problème. Pour corriger votre problème, excluez logback de vos dépendances et ajoutez slf4j-log4j12 pour configurer slf4j avec log4j.


modifier : mis à jour avec divers commentaires

32
répondu Stephane Nicoll 2014-09-02 15:25:13

Vous devez désactiver 151900920" de la dépendance dans pom.xml fichier de l'application web.

même après avoir supprimé commons-logging de pom.xml veuillez vérifier la hiérarchie de dépendances disponible dans Eclipse ou STS IDE. Cela aidera à savoir si d'une certaine façon son être ajouté en raison d'une autre dépendance que nous ne pouvons pas savoir.

0
répondu SachinSarawgi 2016-11-24 20:14:12