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

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.
主站蜘蛛池模板: 博客| 天柱县| 于田县| 夏津县| 林芝县| 泊头市| 平江县| 福海县| 登封市| 木兰县| 沅江市| 张家界市| 陕西省| 浦江县| 洞头县| 新密市| 慈利县| 寿光市| 长兴县| 博兴县| 科技| 眉山市| 哈密市| 凭祥市| 东兰县| 木兰县| 且末县| 安义县| 白河县| 偃师市| 石棉县| 荃湾区| 临汾市| 长兴县| 江阴市| 保靖县| 荔波县| 汝南县| 双柏县| 资中县| 阿坝县|