[
https://issues.apache.org/jira/browse/CAMEL-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13800642#comment-13800642
]
Claus Ibsen commented on CAMEL-6871:
------------------------------------
Adding option {{skipBodyLineSeparator}} so people can configure if they want to
skip the LS or not. This preserves current behavior as default.
For example if your message body is a large XML message with LS you may not
want this to log over 50+ lines etc.
> Log compenent removes line separators from logged message
> ---------------------------------------------------------
>
> Key: CAMEL-6871
> URL: https://issues.apache.org/jira/browse/CAMEL-6871
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.6
> Reporter: Savva Mikhalevski
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.3, 2.12.2, 2.13.0
>
> Attachments: camel-log-formatter-test.zip
>
>
> *Steps*
> # Send exchange with input body equal to {{"1" + LS + "2" + LS + "3"}}, where
> {{LS}} is a system dependent line separator.
> # Log exchange input body with Camel log component:
> {code}<to uri="log:logger_name?level=INFO" />{code}
> *Expected*
> Exchange input body is logged with {{LS}} charcters preserved:
> {code}1
> 2
> 3{code}
> *Observed*
> Exchange is logged without {{LS}} characters:
> {code}123{code}
> *Workaround*
> Use log EIP instead:
> {code}<log loggingLevel="INFO" logName="logger_name" message="${body}"
> />{code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)