i trying log details in db using log4j. have configured logging-channel-adapter wire-tap.
the required logger dbappender same not working.
spring-integration.xml
<int:wire-tap channel="logchannel"/> <int:logging-channel-adapter id="logchannel" level="info" logger-name="audit_the.details" />
log4j.xml
<logger name="audit_the.details"> <level value="info" /> <appender-ref ref="asyncappender" /> </logger> <appender name="asyncappender" class="org.apache.log4j.asyncappender"> <param name="blocking" value="false" /> <appender-ref ref="dbappender" /> </appender> <appender name="dbappender" class="loggertemplate"> <param name="driver" value="oracle.jdbc.oracledriver" /> <param name="sql" value="sql_query" /> <param name="threshold" value="info" /> </appender>
you have configured wiretap channel need put in interceptor tag channel want intercept.not sure if have done missing in post. below 1 example.
<integration:channel id="mydbchannel-to-intercept"> <integration:interceptors> <int:wire-tap channel="logchannel"/> </integration:interceptors> </integration:channel>
Comments
Post a Comment