Hi,
I’m trying to log response body using MessageLogging policy. As recommended here, we have our logging policy in PostClientFlow. Unfortunately, response body doesn’t seem to be available in this flow. What’s the optimal way to log response body? Thank you in advance!
Here’s my logging policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging name="ErrorLogging" enabled="true" continueOnError="false" async="false">
<DisplayName>ErrorLogging</DisplayName>
<File>
<Message>{system.time}: {apiproxy.name}.{environment.name}
Error Information:
Apikey: {apigee.client_id}
Message ID: {messageid}
Consumer Application Name: {developer.app.name}
Http Status Code: {message.status.code}
Error Reason: {message.reason.phrase}
Error Details: {error.message}
Response Body: {response.content}
</Message>
<FileName>abc.log</FileName>
<FileRotationOptions rotateFileOnStartup="true">
<FileRotationType>TIME</FileRotationType>
<RotationFrequency unit="minute">1440</RotationFrequency>
<MaxFilesToRetain>7</MaxFilesToRetain>
</FileRotationOptions>
</File>
<logLevel>ERROR</logLevel>
</MessageLogging>