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 ?
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
You can take a look at my answer here - https://stackoverflow.com/a/36458835/5616671.
If you want to log every record that is being processed by dataweave map
, you can change the filter function to return true
always and log value before returning.
BTW, What type of logging you want to do?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With