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

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.
主站蜘蛛池模板: 远安县| 凤台县| 许昌县| 子洲县| 渭源县| 福海县| 公主岭市| 上高县| 土默特右旗| 长汀县| 洞头县| 绥化市| 阜平县| 洛南县| 保靖县| 顺平县| 陆川县| 故城县| 思茅市| 屏南县| 邵武市| 洞头县| 鹿泉市| 广元市| 扶沟县| 肥西县| 瓦房店市| 兴海县| 永安市| 基隆市| 广西| 青河县| 黄梅县| 和政县| 福州市| 兴仁县| 射阳县| 肥城市| 和龙市| 游戏| 巨鹿县|