spring框架卡在调试日志级别上

我正在尝试通过log4j.xml配置spring框架日志记录级别。 我的文件看起来像这样:

 <!--  -->                         <!--    -->           <!--  -->    

但是,spring正在记录调试信息,这里是catalina.out的示例:

 15:46:03.535 [http-bio-8080-exec-3] DEBUG osswumAntPathRequestMatcher - Checking match of request : '/oauth/token'; against '/oauth/cache_approvals' 15:46:03.536 [http-bio-8080-exec-3] DEBUG osswumAntPathRequestMatcher - Checking match of request : '/oauth/token'; against '/oauth/uncache_approvals' 15:46:03.536 [http-bio-8080-exec-3] DEBUG osswumAntPathRequestMatcher - Checking match of request : '/oauth/token'; against '/oauth/token' 15:46:03.536 [http-bio-8080-exec-3] DEBUG ossecurity.web.FilterChainProxy - /oauth/token?grant_type=password&client_id=my-trusted-client-with-secret&client_secret=somesecret&username=seema&password=jrd@123456 at position 1 of 7 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter' 

请注意,我不是那么多的弹簧专家,所以它可能就像maven(slf4j或其他)中缺少某些依赖项一样简单。

我确定的是log4j.xml位于正确的位置,并且它从spring加载。

编辑:

 I added the debug flags as suggested by stephane and here is the output: delegate: false^M repositories:^M /WEB-INF/classes/^M ----------> Parent Classloader:^M org.apache.catalina.loader.StandardClassLoader@69fc49ef^M . log4j: Using URL [file:/var/lib/tomcat7/webapps/propspace-api/WEB-INF/classes/log4j.xml] for automatic log4j configuration. log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator log4j: System property is :null log4j: Standard DocumentBuilderFactory search succeded. log4j: DocumentBuilderFactory is: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl log4j: debug attribute= "null". log4j: Ignoring debug attribute. log4j: reset attribute= "false". log4j: Threshold ="null". log4j: Retreiving an instance of org.apache.log4j.Logger. log4j: Setting [org.apache] additivity to [true]. log4j: Level value for org.apache is [ERROR]. log4j: org.apache level set to ERROR log4j: Retreiving an instance of org.apache.log4j.Logger. log4j: Setting [org.springframework] additivity to [true]. log4j: Level value for org.springframework is [ERROR]. log4j: org.springframework level set to ERROR log4j: Retreiving an instance of org.apache.log4j.Logger. log4j: Setting [org.springframework.data] additivity to [true]. log4j: Level value for org.springframework.data is [ERROR]. log4j: org.springframework.data level set to ERROR log4j: Retreiving an instance of org.apache.log4j.Logger. log4j: Setting [org.springframework.jdbc.core] additivity to [true]. log4j: Level value for org.springframework.jdbc.core is [WARN]. log4j: org.springframework.jdbc.core level set to WARN log4j: Level value for root is [WARN]. log4j: root level set to WARN log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [target] to [System.out]. `So far so good, but two lines later, i'm still getting the spring debug messages: `17:26:00.630 [localhost-startStop-1] DEBUG osbfsDefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor' 17:26:00.630 [localhost-startStop-1] DEBUG osbfsDefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor' ` 

感谢Stephane, 这篇文章实际上引导我将依赖项排除在logback和jcl-over-slf4j之外。 现在它工作正常。