Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With the Log Mediator you can log mediated messages.

...

Table of Contents
maxLevel3
minLevel3
locationtop
styleborder:1
typeflat
separatorpipe

...

Syntax

The log token refers to a <log> element, which may be used to log messages being mediated:

Code Block

<log [level="string"] [separator="string"]>
   <property name="string" (value="literal" | expression="xpath")/>*
</log>

...

  • Log Category - The Log Mediator supports following log categories:
    • TRACE
    • DEBUG
    • INFO
    • WARN
    • ERROR
    • FATAL

      Info
      titleTip

      Log messages will be logged in log4j with selected log category. The default log category is INFO.

  • Log Level - The Log mediator has four log levels:
    • Simple - To, From, WSAction, SOAPAction, ReplyTo, MessageID and any properties.
    • Headers - All SOAP header blocks and any properties.
    • Full - All attributes are included in log level "simple" and the SOAP envelope and any properties.
    • Custom - The only properties specified to the Log mediator.
  • Log Separator - A separator if defined will be used to separate the attributes being logged. The default separator is the "," comma.

    Note

    Use only the Source View to add a tab (i.e., by defining the separator="&#x9;" parameter in the syntax) or a new line (i.e., by defining the separator="&#xA;" parameter in the syntax) as the Log Separator, since the Design View does not support this.

Properties of the Log Mediator
Anchor
Properties of the Log Mediator
Properties of the Log Mediator

...

In the example, it logs everything including the full SOAP message.

Excerpt
hiddentrue

Description of the Log Mediator in WSO2 ESB.