The Log mediator is used to log mediated messages. See Logging for more information on logging in the ESB.
The log token refers to a
<log> element, which may be used to log messages being mediated.
The general parameters available to configure the Log mediator are as follows.
This parameter is used to specify the log category. Possible values are as follows. Following log levels correspond to ESB service level logs.
This parameter is used to specify the log level. The possible values are as follows.
The properties included in the Log mediator configuration will be logged regardless of the log level selected.
This parameter is used to specify a value to be used in the log to separate attributes. The
Use only the Source View to add a tab (i.e., by defining the
Properties to be logged by the Log mediator can be added by clicking Add Property. The parameters available to configure a property are as follows.
|Property Name||The name of the property to be logged.|
The possible values for this parameter are as follows:
This parameter is used to enter a status value as the property value, or to enter an expression to evaluate the property value based on the what you entered for the Property Value parameter. When specifying a JSONPath, use the format
You can click NameSpaces to add namespaces if you are providing an expression. Then the Namespace Editor panel would appear where you can provide any number of namespace prefixes and URLs used in the XPath expression.
|Action||This parameter allows the property to be deleted.|
You can configure the mediator using XML. Click switch to source view in the Mediator window.
Example 1 - Full log
In this example, everything is logged including the complete SOAP message.
Example 2 - Custom logs
In this example, the log level is
custom. A property with an XPath expression which is used to get a stock price from a message is included. This results in logging the stock price which is a dynamic value.