- 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.
推薦閱讀
- Visual Basic .NET程序設(shè)計(第3版)
- 零基礎(chǔ)學Visual C++第3版
- Leap Motion Development Essentials
- iOS開發(fā)實戰(zhàn):從零基礎(chǔ)到App Store上架
- 羅克韋爾ControlLogix系統(tǒng)應用技術(shù)
- Mastering LibGDX Game Development
- 深入理解Elasticsearch(原書第3版)
- The Professional ScrumMaster’s Handbook
- Visual Studio Code 權(quán)威指南
- 代替VBA!用Python輕松實現(xiàn)Excel編程
- Clojure for Java Developers
- Learning JavaScript Data Structures and Algorithms(Second Edition)
- Spring 5 Design Patterns
- CodeIgniter Web Application Blueprints
- Python Web自動化測試設(shè)計與實現(xiàn)