'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.
2018-03-10, 329👍, 0💬
Why Do You Need to Filter Out Empty Files in PHP? When you are processing uploaded files, you need t...
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...
How To Merge Values of Two Arrays into a Single Array in PHP? You can use the array_merge() function...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
How to build a WPF application with VC# and XAML in Visual Studio 2017? If you want to build a WPF (...