Can anyone tell me how to insert a new line in the message of a mule logger component?
For example, I have the following in the message for the logger:
Payload is: #[payload]
Inbound Headers: #[headers:INBOUND:*]
Outbound Headers: #[headers:OUTBOUND:*]
Exceptions: #[exception]
I'd like to insert a new line after each of the above. I've tried just adding \n to the end of each line, but that didn't work.
There are a couple of ways to do this:
1) Use: #[System.getProperty('line.separator')]
2) Use: #['\n'] eg: #['Hello\n'+payload+'Welcome to \n new line']
Use MEL:
we can you the below format
//This should work. tested in mule 3.9 CE
use expression-transformer:
You could do something like this: