[slf4j-user] SLF4J + Logback + jcl-over-slf4j + Spring Framework = TONS of DEBUG logging

Ceki Gulcu ceki at qos.ch
Mon Oct 26 09:21:27 CET 2009


Hello Dana,

It looks like a logback-classic configuration issue. Try

<logger name="org.springframework" level="WARN"/>

in order to filter out messages of level INFO generated by spring.

HTH,

Dana P'Simer wrote:
> I am using springframework in an application I am writing and I want to 
> use SLF4J for my logging.  I noticed that Spring's logging looked 
> different and so I added in the jcl-over-slf4j and now Spring's logging 
> looks like mine but I am getting a TON of it at DEBUG level.  Here's a 
> sample:
> 
> 17:52:42.134 {main} INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading 
> XML bean definitions from class path resource [bootstrap-context.xml]
> 17:52:42.154 {main} DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP 
> provider 
> [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
> 17:52:42.246 {main} DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loading 
> schema mappings from [META-INF/spring.schemas]
> ...
> 
> Here's my logback.xml:
> 
> <configuration>
> 
>   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
>     <layout class="ch.qos.logback.classic.PatternLayout">
>       <Pattern>%d{HH:mm:ss.SSS} {%thread} %-5level %logger{36} - 
> %msg%n</Pattern>
>     </layout>
>   </appender>
> 
>   <logger name="org.springframework" level="INFO"/>
>  
>   <root level="info">
>     <appender-ref ref="STDOUT" />
>   </root>
> </configuration>
> 
> I know I have this in the right place because, I changed some small 
> aspect of the format Pattern to be sure.
> 
> I first tried it without the <logger name="org.springframework"...>  tag 
> and got the same result.
> 
> Am I missing something here?  Seems to me this config should work, at 
> least according to my reading of the logback docs.
> 
> Should I be posting this to the logback forum?
> 
> Anyway, any help would be greatly appreciated.
> 
> Thanks,
> 
> Dana P'Simer
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch



More information about the slf4j-user mailing list