I'm using the .log() function from Spring Integration DSL and I want to create a log at the DEBUG level. Here is an example:
...
.<DataDTO>log(LoggingHandler.Level.DEBUG, "Http Input Flow V2",
message -> {
DataDTO dto = message.getPayload();
return "Input data: " + dto.toString;
})
...
This works, however, two logging messages are created: the actual logging message Input data: ...
and the one from the AbstractMessageHandler
:
@Override
public void handleMessage(Message<?> message) {
...
if (this.loggingEnabled && this.logger.isDebugEnabled()) {
this.logger.debug(this + " received message: " + message);
}
...
}
In AbstractMessageHandler
, this.loggingEnabled
is set to true
by default.
Is it possible to disable the logging in the AbstractMessageHandler
but keep the custom log message? I've tried to set the logging level for the AbstractMessageHandler
in my application.yml
to ERROR
, but this did not help.