Sending a message to log endpoint should not convert payload to StreamCache
---------------------------------------------------------------------------
Key: CAMEL-3949
URL: https://issues.apache.org/jira/browse/CAMEL-3949
Project: Camel
Issue Type: Improvement
Components: camel-core
Affects Versions: 2.7.0
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Priority: Minor
Fix For: 2.8.0
We should not automatic try to convert the payload to a StreamCache if you send
a message to a log endpoint.
{code}
StreamCache newBody = message.getBody(StreamCache.class);
if (newBody != null) {
message.setBody(newBody);
}
{code}
Only if people have explicit enabled stream cache we can safely log it.
Otherwise we should not output streams in the log.
We should use the extractBodyForLogging from MessageHelper instead which cater
for this.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira