Logging inside WSO2 ESB Script Mediator
Dec 17, 2023
[Article moved from ajanthane.blogspot.com]
This article shows how to log inside WSO2 ESB Script Mediator to printing them into wso2carbon.log.
<proxy name="ScriptLoggingProxy" startonload="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
<target>
<insequence>
<log level="custom">
<property name="STATUS:" value="------------------ScriptLoggingProxy--------------">
</property></log>
<script language="js">
var log = mc.getServiceLog();
log.info("-----------Executing Script Mediator-------------------- ");
</script>
</insequence>
</target>
<description>
</description></proxy>