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

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.
主站蜘蛛池模板: 凤台县| 巴林右旗| 科技| 中江县| 淮南市| 蓝山县| 阜宁县| 于都县| 贵德县| 德惠市| 鲁山县| 乌拉特后旗| 祥云县| 井陉县| 维西| 斗六市| 安西县| 修水县| 皮山县| 惠安县| 枣阳市| 旅游| 涿州市| 庆云县| 富顺县| 长治市| 广水市| 方城县| 普定县| 泸定县| 南澳县| 霍城县| 额尔古纳市| 保山市| 南京市| 西青区| 江门市| 五常市| 班玛县| 松滋市| 甘孜县|