Alter default Spring Integration DirectChannel logging

Well, it is not possible to filter out a content of the message before logging (yet): https://github.com/spring-projects/spring-integration/issues/3222.

However you ca stop having a DEBUG logging level for the org.springframework.integration, but rather use a Wire-Tap on the particular channels to catch their messages and send dump them into the LoggingHandler with custom category and specific setLogExpression to do somehing with the message before logging it. That expression may call some bean (using an @ operator) and with the #root as an argument which is the whole Message for logging. Only the result of that call is going to be logged. So, you are free to build any filtering logic in that target bean you are going to call from this expression!

See more info in docs:

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top