Logging inside WSO2 ESB Script Mediator

--

[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>

--

--

Ajanthan Eliyathamby πŸ‡±πŸ‡°
Ajanthan Eliyathamby πŸ‡±πŸ‡°

Written by Ajanthan Eliyathamby πŸ‡±πŸ‡°

Associate Architect β€” Enterprise Integration | 14x WSO2 | 1x HashiCorp | 1Γ— Azure | Runner-Up WCPY 2020 | https://ajanthane.blogspot.com

No responses yet