1
votes

I'm using spring integration in my application,
The information in the payload of messages are sensitive so I don't want it to be logged.
I've removed all of the payloads from spring integration INFO logs but,
when changing spring integration log level to DEBUG,
the payload and headers of messages are logged when
messages are sent on various components of spring integration.

The question is how could I disable logging of payload of message in DEBUG mode?
(Is there any way to extend logging facility of spring integration and introduce my own implementation to spring integration?)

thanks in advance

1

1 Answers

1
votes

You could use a custom Appender (implementation depending on what logging subsystem you use). Or, you use a patched version of Apache Commons Logging to remove the payload in the logger before it gets to the appender).