복붙노트

[SPRING] Spring logging DEBUG 메시지를 비활성화하는 방법은 무엇입니까?

SPRING

Spring logging DEBUG 메시지를 비활성화하는 방법은 무엇입니까?

나는 간단한 데스크톱 애플 리케이션 (webapp이 아닌)에서 일하고있다.

다음은 내 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

보시다시피 콘솔에서 Spring 로깅 메시지를 제거하기 위해이 솔루션을 시도했습니다.

읽을 수있는 로그를 갖기 위해 Spring 로그를 사용 불가능하게한다.

내 코드에서 log4j 로거를 호출 할 때 로깅 메시지는 위에 지정된 패턴 (좋은)에 따른다.

그러나, 나쁜 부분은 - 나는 아직도 봄부터 콘솔 DEBUG 레벨 메시지에 도달 ... 그들은 여기처럼 보입니다 : 로깅 메시지를 비활성화 할 수 없습니다.

그리고 그들은 다른 패턴을 가지고 있습니다. 그들이 내 설정을 무시하는 것처럼.

나는 또한 내가 여기에서 찾은 제안들을 적용하려고 시도했다.

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

내 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>

SLF4J도 없습니다. 이 옵션은 잘못된 것이 아니라면 위의 링크에서 유효한 옵션으로 언급되었습니다.

여기서 내가 무엇을 놓칠까요?

-Dlog4j.debug = true를 사용하는 OUTPUT

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
.......................

-Dorg.apache.commons.logging.diagnostics.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-workspace\workflow\target\classes;C:\eclipse-workspace\idm-authentication-service\target\classes;C:\Users\jsmith\.m2\repository\com\ln\idm\product\idm-product-service\1.0-SNAPSHOT\idm-product-service-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\com\ln\idm\service\idm-service\1.0-SNAPSHOT\idm-service-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\com\ln\idm\domain\idm-internal-api\1.0-SNAPSHOT\idm-internal-api-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-databinding-xmlbeans\2.7.6\cxf-rt-databinding-xmlbeans-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-api\2.7.6\cxf-api-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.2.0\woodstox-core-asl-4.2.0.jar;C:\Users\jsmith\.m2\repository\wsdl4j\wsdl4j\1.6.3\wsdl4j-1.6.3.jar;C:\Users\jsmith\.m2\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-core\2.7.6\cxf-rt-core-2.7.6.jar;C:\Users\jsmith\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.6\jaxb-impl-2.2.6.jar;C:\Users\jsmith\.m2\repository\org\apache\ws\xmlschema\xmlschema-core\2.0.3\xmlschema-core-2.0.3.jar;C:\Users\jsmith\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-frontend-simple\2.7.6\cxf-rt-frontend-simple-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-bindings-soap\2.7.6\cxf-rt-bindings-soap-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-databinding-jaxb\2.7.6\cxf-rt-databinding-jaxb-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-frontend-jaxws\2.7.6\cxf-rt-frontend-jaxws-2.7.6.jar;C:\Users\jsmith\.m2\repository\xml-resolver\xml-resolver\1.2\xml-resolver-1.2.jar;C:\Users\jsmith\.m2\repository\asm\asm\3.3.1\asm-3.3.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-bindings-xml\2.7.6\cxf-rt-bindings-xml-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-addr\2.7.6\cxf-rt-ws-addr-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-policy\2.7.6\cxf-rt-ws-policy-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\neethi\neethi\3.0.2\neethi-3.0.2.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-transports-http\2.7.6\cxf-rt-transports-http-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\woodstox-core-lgpl\4.2.0\woodstox-core-lgpl-4.2.0.jar;C:\Users\jsmith\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-security\2.7.6\cxf-rt-ws-security-2.7.6.jar;C:\Users\jsmith\.m2\repository\net\sf\ehcache\ehcache-core\2.5.1\ehcache-core-2.5.1.jar;C:\Users\jsmith\.m2\repository\org\apache\ws\security\wss4j\1.5.8\wss4j-1.5.8.jar;C:\Users\jsmith\.m2\repository\org\apache\santuario\xmlsec\1.4.3\xmlsec-1.4.3.jar;C:\Users\jsmith\.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar;C:\Users\jsmith\.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar;C:\Users\jsmith\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\jsmith\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-web\3.2.4.RELEASE\spring-web-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-beans\3.2.4.RELEASE\spring-beans-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-tx\3.2.4.RELEASE\spring-tx-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-orm\3.2.4.RELEASE\spring-orm-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-oxm\3.2.4.RELEASE\spring-oxm-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-test\3.2.4.RELEASE\spring-test-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-mock\2.0.8\spring-mock-2.0.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-support\2.0.8\spring-support-2.0.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-webmvc\3.2.4.RELEASE\spring-webmvc-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-aspects\3.2.4.RELEASE\spring-aspects-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\aspectj\aspectjweaver\1.7.2\aspectjweaver-1.7.2.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-context-support\3.2.4.RELEASE\spring-context-support-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\apache\xbean\xbean-spring\2.8\xbean-spring-2.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-core\3.1.4.RELEASE\spring-security-core-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-web\3.1.4.RELEASE\spring-security-web-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-config\3.1.4.RELEASE\spring-security-config-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-taglibs\3.1.4.RELEASE\spring-security-taglibs-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-acl\3.1.4.RELEASE\spring-security-acl-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\com\jhlabs\imaging\BLS\imaging-BLS.jar;C:\Users\jsmith\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;C:\Users\jsmith\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\jsmith\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\jsmith\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\Users\jsmith\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;C:\Users\jsmith\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\jsmith\.m2\repository\commons-lang\commons-lang\2.3\commons-lang-2.3.jar;C:\Users\jsmith\.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\jsmith\.m2\repository\org\mockito\mockito-core\1.9.5\mockito-core-1.9.5.jar;C:\Users\jsmith\.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\Users\jsmith\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\jsmith\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\jsmith\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\jsmith\.m2\repository\org\springmodules\spring-modules-jakarta-commons\0.8\spring-modules-jakarta-commons-0.8.jar;C:\Users\jsmith\.m2\repository\commons-validator\commons-validator\1.1.4\commons-validator-1.1.4.jar;C:\Users\jsmith\.m2\repository\commons-chain\commons-chain\1.1\commons-chain-1.1.jar;C:\Users\jsmith\.m2\repository\javax\portlet\portlet-api\1.0\portlet-api-1.0.jar;C:\Users\jsmith\.m2\repository\myfaces\myfaces-api\1.1.0\myfaces-api-1.1.0.jar;C:\Users\jsmith\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\Users\jsmith\.m2\repository\commons-el\commons-el\1.0\commons-el-1.0.jar;C:\Users\jsmith\.m2\repository\commons-fileupload\commons-fileupload\1.0\commons-fileupload-1.0.jar;C:\Users\jsmith\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Users\jsmith\.m2\repository\javax\servlet\jstl\1.1.2\jstl-1.1.2.jar;C:\Users\jsmith\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.5\jcl-over-slf4j-1.7.5.jar;C:\Users\jsmith\.m2\repository\org\slf4j\jul-to-slf4j\1.7.5\jul-to-slf4j-1.7.5.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-access\1.0.13\logback-access-1.0.13.jar;C:\eclipse-workspace\idm-verification-service\target\classes;C:\Users\jsmith\.m2\repository\junit\junit\4.4\junit-4.4.jar;C:\Users\jsmith\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\jsmith\.m2\repository\ca\grimoire\log-annotations\1.0\log-annotations-1.0.jar;C:\Users\jsmith\.m2\repository\org\aspectj\aspectjrt\1.6.9\aspectjrt-1.6.9.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-jdbc\3.2.0.RELEASE\spring-jdbc-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-core\3.2.0.RELEASE\spring-core-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-context\3.2.0.RELEASE\spring-context-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-aop\3.2.0.RELEASE\spring-aop-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-expression\3.2.0.RELEASE\spring-expression-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\mysql\mysql-connector-java\5.1.9\mysql-connector-java-5.1.9.jar;C:\Users\jsmith\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;C:\Users\jsmith\.m2\repository\org\apache\commons\commons-lang3\3.2.1\commons-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

해결법

  1. ==============================

    1.Spring은 사용할 로깅 프레임 워크를 자동 감지하는 commons-logging을 사용합니다. 어떤 로깅 프레임 워크가 선택 될지를 여러 가지 방법으로 조정할 수 있습니다. 먼저 할 일은 commons-logging이 log4j에 바인드되도록하는 것입니다.

    Spring은 사용할 로깅 프레임 워크를 자동 감지하는 commons-logging을 사용합니다. 어떤 로깅 프레임 워크가 선택 될지를 여러 가지 방법으로 조정할 수 있습니다. 먼저 할 일은 commons-logging이 log4j에 바인드되도록하는 것입니다.

    이를 수행하려면 검색 프로세스의 결과를 출력 할 추가 플래그 -Dorg.apache.commons.logging.diagnostics.dest = STDOUT을 사용하여 응용 프로그램을 시작하십시오.

    이제 log4j가 예상 된 구성으로 초기화되는지 확인해야합니다. 기본적으로 log4j는 클래스 경로의 루트에서 log4j.xml 파일을 검색하고 찾지 못하면 log4j.properties로 폴백합니다. 사용중인 라이브러리 중 하나가 root에서 log4j.xml 파일을 잘못 (잘못) 사용했을 수 있습니다.

    log4j를 디버그하려면 추가 플래그 -Dlog4j.debug = true를 사용하여 응용 프로그램을 다시 실행하십시오. 그러면 정확한 로거와 구성 파일의 위치가 출력됩니다.

    commons-logging이 log4j에 위임하지 않으면 다른 로깅 프레임 워크가 관련되어 있음을 의미합니다. 가장 일반적인 시나리오는 응용 프로그램이 jbl-over-slf4j.jar과 함께 제공된다는 것인데, 이는 장면 뒤에서 slf4j를 사용하는 commons-logging의 드롭 인 대체입니다.

    이 시나리오에서 Spring은 slf4j에 위임하도록 구성된 commons-logging을 사용합니다. 그래서 본질적으로 스프링은 slf4j를 사용하고 있습니다. 하지만 slf4j는 간단한 로깅 외관이며 실제 프레임 워크에 바인딩해야합니다.

    일단 바인딩 라이브러리 (예를 들어 logback 또는 log4j 일 수 있음)를 찾으면 slf4j가 바인드 된 로깅 프레임 워크의 구성을 확인하십시오.

    이 특별한 경우에는 클래스 패스에 로그백이있을 것입니다. slf4j를 순수하게 구현했기 때문에 바인딩 라이브러리가 필요하지 않으며 실제로 문제와 일치하는 구성 파일이 제공되지 않으면 디버그에 로그인합니다. 문제를 해결하려면 logback을 종속 항목에서 제외하고 slf4j-log4j12를 추가하여 slf4j를 log4j로 구성하십시오.

    편집 : 다양한 의견으로 업데이트 됨

  2. ==============================

    2.웹 응용 프로그램의 pom.xml 파일의 종속성에서 commons-logging을 비활성화해야합니다.

    웹 응용 프로그램의 pom.xml 파일의 종속성에서 commons-logging을 비활성화해야합니다.

    pom.xml에서 commons-logging을 제거한 후에도 Eclipse 또는 STS IDE에서 사용할 수있는 종속성 계층 구조를 확인하십시오. 이것은 우리가 알지 못하는 다른 의존성 때문에 어떻게 든 추가되는지 알기 쉽게 도와줍니다.

  3. from https://stackoverflow.com/questions/21739578/how-to-disable-spring-logging-debug-messages by cc-by-sa and MIT license