0
votes

I need help on conditional logic in logger.

I am using attached code in logger processor but getting errors:

enter image description here

1
Where is the logger processor complete with the expression? And please use text, not screenshots for code. - aled

1 Answers

1
votes

Are you looking to achieve something like below?

enter image description here

Update:

Try with the Logger content in the screenshot:

<logger level="INFO" doc:name="Logger" doc:id="a45f1214-f063-47bc-8c8f-a72b65b5633f" message='#[%dw 2.0
output  /java
var TxId="1"
---
if(!isEmpty(vars.TxType)) "Trx Id:" ++ TxId ++ " Trx Type:" ++ vars.TxType  else "Invalid Partner"]'/>

enter image description here