- WSO2 Developer’s Guide
- Fidel Prieto Estrada Ramón Garrido Lázaro
- 129字
- 2021-07-08 10:06:00
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.
推薦閱讀
- ASP.NET Web API:Build RESTful web applications and services on the .NET framework
- Building a RESTful Web Service with Spring
- Python測試開發入門與實踐
- 你必須知道的204個Visual C++開發問題
- Jupyter數據科學實戰
- Learning Zurb Foundation
- C語言課程設計
- Learning Unity 2D Game Development by Example
- Asynchronous Android Programming(Second Edition)
- 深度學習:Java語言實現
- MongoDB,Express,Angular,and Node.js Fundamentals
- 打開Go語言之門:入門、實戰與進階
- 愛上C語言:C KISS
- 基于MATLAB的控制系統仿真及應用
- Python滲透測試編程技術:方法與實踐(第2版)