How can we write debug information in Edge Trace tool?
I am using a JavaScript policy & want to write some custom debug messages to the APIGEE trace tool.
Please let me know how we can achieve this?
you can use the print() function to output debug information to the trace tool.
For example
if(context.flow=="TARGET_REQ_FLOW") { print("In target request flow"); var username = context.getVariable("USER.name"); var url ="http://mocktarget.apigee.net/user?" context.setVariable("target.url", url +"user="+ username); print("callout to URL: ", context.getVariable("target.url")); }
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |