Tools, FAQ, Tutorials:
'trace' Policy Statement
How to use the "trace" Policy Statement for an Azure API service operation?
✍: FYIcenter.com
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.
Â
⇒ '@(...)' Expressions in Azure API Policy
2018-03-10, 1069👍, 0💬
Popular Posts:
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...
How Values in Arrays Are Indexed in PHP? Values in an array are all indexed their corresponding keys...
How to search for the first match of a regular expression using re.search()? The re.search() functio...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...