官术网_书友最值得收藏!

The log mediator

The log mediator allows us to show and save some information in the console and server log, which is useful to audit the services.

Now, let's look at the syntax:

<log [level="string"] [separator="string"]>
    <property name="string" (value="literal" | expression="[XPath|json- 
eval(JSON Path)]")/>* </log>

We have six different categories, sorted by informational purpose to error logs:

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL

We also have four levels of log:

  • Custom: Show the properties configured inside
  • Full: The Show To, From, WSAction, SOAPAction, ReplyTo, and MessageID headers and the current payload
  • Headers: Log all the SOAP headers
  • Simple: Log To, From, WSAction, SOAPAction, ReplyTo, and MessageID headers

For example, to log the full content of the payload, we can use the following syntax:

<log level="full"/>

Alternatively, to only log a custom property, use this:

<log category="INFO" separator=",">
    <property name="dynamicProperty"                  
expression="http://xpathExpression" /> </log>
By default, the log is placed at: <WSO2_HOME>/repository/log/wso2carbon.log.
主站蜘蛛池模板: 罗城| 石首市| 营口市| 永福县| 邛崃市| 石屏县| 乐安县| 永年县| 申扎县| 民权县| 新沂市| 拜城县| 茶陵县| 沽源县| 石棉县| 河津市| 赤峰市| 英山县| 内丘县| 许昌市| 金昌市| 滨海县| 常德市| 甘德县| 巴彦县| 华蓥市| 苗栗县| 佛教| 灌云县| 武冈市| 施秉县| 田东县| 福贡县| 江华| 萨迦县| 富川| 镇康县| 碌曲县| 台东市| 四川省| 长海县|