You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Minsheng Shen <mi...@avaya.com> on 2013/05/30 21:22:26 UTC
how to add a carriage return to the end of output
Hi
I am using Camel 2.10.4 and using File2 component as output of a route. It
seems fileExist=Append option does not add a carriage return to the end of
ouput. I want to add carrage return to every entry so that the output looks
nicer.
Here is the route:
<onException useOriginalMessage="true">
<exception>org.springframework.dao.DataAccessException</exception>
<redeliveryPolicy maximumRedeliveries="5" redeliveryDelay="1000"
backOffMultiplier="2"/>
<handled><constant>true</constant></handled>
<transform>
<simple>${in.body}\n</simple>
</transform>
<to
uri="file:{{bad.messages.dir}}?fileName={{bad.messages.file}}&autoCreate=true&fileExist=Append"
/>
</onException>
I also tried
<transform>
<simple>${in.body}\r</simple>
</transform>
The Simple language page http://camel.apache.org/simple.html says from
Camel 2.9.3 onwards, "\n" should work add a newline. I tried both "\n" and
"\r", and they do not work.
Did I do anything wrong?
Thanks
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-add-a-carriage-return-to-the-end-of-output-tp5733523.html
Sent from the Camel - Users mailing list archive at Nabble.com.