I want to log from withing Javascript script mediator for debugging porpouses. It is quite annoying to have to add the message/variable value... to a context variable and use a log mediator in the sequence.
Is there a way to avoid this?
King Regards.
You just need to get ServiceLog inside the script mediator and use it as follows:
<script language="js">
var log = mc.getServiceLog();
log.info("Logging inside Script Mediator");
</script>
You can use print(message/variable);
. It will display the message/variable in the terminal.
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