Search code examples
muleanypoint-studiodataweave

logging from inside dataweave


Just like we use

<xsl:message> 

inside XSL transformer and

system.out.println

for datamapper, do we have any logging mechanism for dataweave ? If not a direct component, do we have any other alternate mechanisms to achieve logging from inside dataweave ?


Solution

  • In mule 3.8 you can do it like this ,mule allows logging in dataweave

     %dw 1.0 
     %output application/json
     --- 
     {   
       result: log("Logging the array",[1,2,3,4]) 
     }
    

    you can refer the latest document for this here