Logging inside wso2 esb script mediator



I was working with wso2-synapse and had to use script mediator. I needed to log inside the script mediator and came across this code snippet.

<script language="js">
 
var log =  mc.getServiceLog();
 
log.info("Inside The Script Mediator.....");
 
</script>