Message Logging Policy

Is it possible to use multiple message logging policies in postclient flow. My requirement is to log the metadata if the response is 200, log entire message including request payload and response in case of error. Currenly I am using messagelogging policy with condition (is.error = false) to log metadat and JavaScript policy in DefaultFaultRule to log data in case of error response.

Solved Solved
0 3 462
1 ACCEPTED SOLUTION

As far as I know, yes, it is possible.

View solution in original post

3 REPLIES 3

As far as I know, yes, it is possible.

Thanks Dino. It is working. But I am not seeing the request content and error content in kibana. The flow variables are populated with the data, I can see that in the trace tool, but I am not seeing the same in kibana.

@sekhar gaddam

The apigee defined flow variables request.content, response.content etc are not available in the post client flow. You can try copying that explicitly into a user-defined variable using the assign message policy in your preflow/post flow, then you will be able to use it in the message-logging policy in post client flow