spring - configuring log4j for loggin-channel-adaptor -


i using spring-integration process message message queue using jms-message-driven-channel-adaptor puts message processmessage channel. have configured wire-tap intercept message , log message log file.

i want log payload log file when start application, application level logs getting logged log file along payload.

below spring configuration , log4j configuration more details.

spring configuration:

<int-jms:message-driven-channel-adapter     channel="processmessage" destination-name="mytest.queue"/>  <int:channel id="processmessage">     <int:interceptors>         <int:wire-tap channel="logger"></int:wire-tap>     </int:interceptors> </int:channel>  <int:logging-channel-adapter channel="logger" logger-name="mylogger"     level="info" log-full-message="true"> </int:logging-channel-adapter> 

log4j configuration:

log4j.rootlogger = info, mylogger log4j.appender.mylogger=org.apache.log4j.fileappender log4j.appender.mylogger.file=/app/logs/jms.log log4j.appender.mylogger.layout=org.apache.log4j.patternlayout log4j.appender.mylogger.layout.conversionpattern=%m%n 

please let me know going wrong.

because have log4j config like:

log4j.rootlogger = info, mylogger 

therefore categories use custom appender.

maybe stdout them:

log4j.appender.stdout=org.apache.log4j.consoleappender log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern=%d %p [%t] [%c] - %m%n 

?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -