Tag: propertylog

WSO2 ESB – Add Custom level log

By setting the log level to “custom” , we can add custom log in ESB proxy .

1. Log a custom String value (e.g Hello World)

<log level=”custom”>
<property name=”MyCustomLog” value=”Hello World”/>
</log>

 

2. Log a property value using custom log level. use expression attribute to read the value of property.

<property name=”Symbol” value=”wso2″/>

———————————————————————————

<log level=”custom”>
<property name=”customlog” expression=”$ctx:Symbol”/>
</log>

OR

<log level=”custom”>
<property name=”customlog” expression=”get-property(‘Symbol’)/>
</log>