Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
This sample demonstrates how you can use the
SynapseObserver interface to monitor the Synapse configuration at runtime.
For a list of prerequisites, see Prerequisites to Start the ESB Samples.
Building the sample
- To define the simple logging Synapse observer, open the
<EI_HOME>/conf/synapse.propertiesfile and add the following line:
- To set the log level of the
INFO, open the
<EI_HOME>/conf/log4j.propertiesfile and add the following line:
Executing the sample
Start the ESB with any sample configuration. For instructions on starting a sample ESB configuration, see Starting the ESB with a sample configuration.
Analyzing the output
You will see that the SimpleLoggingObserver captures events that occur while constructing the Synapse configuration and logs them on the console as follows:
SimpleLoggingObserver is implemented as follows:
It does not override any of the event handler implementations in the
AbstractSynapseObserver class. The
AbstractSynapseObserver logs all the received events by default.