'trace' Policy Statement
How to use the "trace" Policy Statement for an Azure API service operation?
The "trace" policy statement allows you to generate debugging messages into the API trace output. The "trace" statement can be used in any policy blocks in the policy XML document.
The "trace" statement has the following syntax:
<trace source="MyDebug"/> <!-- string expression or text --> </trace>
For example, the following inbound policy uses a "trace" statement to generate message using a text to the API trace output identified as "MyDebug":
<inbound> <trace source="MyDebug"/>I am here!</trace> </inbound>
The following inbound policy uses a "trace" statement to generate message using a C# string expression to the API trace output identified as "MyDebug":
<inbound> <trace source="MyDebug"/> @("I am here!")</trace> </inbound>
When you test the API operation with this policy on Azure developer portal, you will see a "MyDebug" section in the "trace" output tab displaying the given message.
For more information on "trace" policy statement, see API Management policies Website.
2017-09-23, 150👍, 0💬
How To Control Horizontal Alignment in Table Cells? By default, text in all table cells are aligned ...
How To Quote Date and Time Values in SQL Statements in PHP? If you want to provide date and time val...
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...
Where to find tutorials on how to work with MySQL Database in PHP? A collection of tutorials to answ...
How To Write a String to a File with a File Handle in PHP? If you have a file handle linked to a fil...