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

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.
主站蜘蛛池模板: 咸丰县| 荆州市| 和田市| 天峻县| 亳州市| 台湾省| 北海市| 北安市| 石棉县| 和林格尔县| 剑河县| 和林格尔县| 颍上县| 淄博市| 翁源县| 南华县| 九龙城区| 卓资县| 阿拉善右旗| 沙田区| 留坝县| 府谷县| 清水县| 青神县| 重庆市| 青海省| 湟源县| 平度市| 绥棱县| 呼图壁县| 深水埗区| 资中县| 桃源县| 德化县| 马鞍山市| 富锦市| 绥江县| 高尔夫| 松潘县| 海门市| 黄平县|