Multiple logging policies

Is it possible to specify multiple logging policies for an API proxy? I have configured four logging polices: preflow-request, preflow-response, postflow-request and postflow-response, but only see one logging entry being sent to the target Syslog server

0 5 413
5 REPLIES 5

Just a thought:

Why don't you capture/extract the required information & use postclient flow to attach message logging policy & provide the captured information in Message.

<Message> Request: {logging.Reqmessage} Response: {logging.Respmessage} Metadata: {logging.metadat} </Message>

-Vinay

Not applicable

Hi @Kevin Treacy,

This is very much possible and actually there is no upper limit on the number of message logging policies in a proxy. Could you share detail about exact issue as being faced.

At the same time, I would suggest:

Note that PostClientFlow has been designed specifically for MessageLogging policy only. This reduces response latency by executing this policy once the response has been sent to client app. Also, it provides additional information related to time stamp.

Regards,

Rajesh Doda

Hello,

Not sure if this is the right place. We have a scenario where we need to send log entries to multiple log destinations:

  • The sensitive data (PII nature) to a private syslog instance within the enterprise
  • Non-sensitive data of operational nature (success/failure details) to a syslog on an AWS instance

Please note, we are using Apigee cloud. Mainly looking for things like performance impact if any (should not have impacts, since its in the PostClientFlow). Any thoughts appreciated.

Thanks,

Girish

@Girish Gajria, I don't see any issues. You have to create two policies. Let us know if you face any issues.

Cheers,

Rajesh Doda

Thanks @rdoda. Not seeing any issues. Just wanted to double check, before I implement on one of the proxies I am working on, specially with respect to performance (since it has to establish Syslog connections and thus use two TCP sockets per request).

Thanks,

Girish