- 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.
推薦閱讀
- The Computer Vision Workshop
- HTML5+CSS3網站設計基礎教程
- Learning Zurb Foundation
- Cocos2d-x學習筆記:完全掌握Lua API與游戲項目開發 (未來書庫)
- C++語言程序設計
- Image Processing with ImageJ
- Scala編程(第5版)
- Raspberry Pi Robotic Blueprints
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- 超簡單:用Python讓Excel飛起來(實戰150例)
- 多媒體技術及應用
- Puppet:Mastering Infrastructure Automation
- 軟件設計模式(Java版)
- 從零開始學UI設計·基礎篇
- 多接入邊緣計算實戰