谁能告诉我如何在骡子记录器组件的消息中插入新行?
例如,我在记录器的消息中有以下内容:
Payload is: #[payload]
Inbound Headers: #[headers:INBOUND:*]
Outbound Headers: #[headers:OUTBOUND:*]
Exceptions: #[exception]
我想在上述每一项之后插入一个新行。我试过在每一行的末尾添加\n ,但这没有用。
最佳答案
使用 MEL:
<logger
message="#['Payload is:'+payload+'\nInbound Headers: '+message.inboundProperties.entrySet()+'\nOutbound Headers: '+message.outboundProperties.entrySet()+'\nExceptions: '+exception]"
level="INFO" />
关于logging - 如何在 mule logger 组件的消息正文中插入换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15254304/