Reputation: 39
I am trying to add wire-tap to intercept the channel but it is not using my logback configuration but instead it uses org.apache.commons.logging.impl.Jdk14Logger. How do tell LoggingHandler.messageLogger to use lmy logback configuration?
<int:channel id="testChannel">
<int:interceptors>
<int:wire-tap channel="loggerChannel"/>
</int:interceptors>
</int:channel>
<int:logging-channel-adapter id="loggerChannel" level="DEBUG"/>
My logback has following configurayion defined
<logger name="org.springframework" level="DEBUG"/>
<logger name="org.springframework.integration" level="DEBUG"/>
<logger name="org.springframework.integration.handler.LoggingHandler" level="DEBUG"/>
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ROLLING"/>
</root>
Upvotes: 2
Views: 5740
Reputation: 174554
For historical reasons, Spring uses commons-logging internally; you can wire in logback using slf4j.
See the note in the Spring Reference.
Here's another howto.
Essentially you need to exclude commons-logging
from spring deps and add jcl-over-slf4j
.
Upvotes: 3