Logging mechanism in APIGEE.

ajytwi
New Member

Hi All,

We want to do apply logging mechanism for one the client but we want to use system level logging(file based per proxy specific) and not want to use loggly can anyone help me how to achieve this with best practices.

We are using on promises configuration.

Also do we need to setup syslog server for this??

Thanks

Solved Solved
0 8 3,403
1 ACCEPTED SOLUTION

8 REPLIES 8

Hi @Ajay Tiwari, if you are using on-premise Apigee, then please have a look at this doc,

https://docs.apigee.com/api-platform/reference/policies/message-logging-policy#location

ajytwi
New Member

Hi @Siddharth BarahalikarI have also read from the documents that message logging should be done in PostClientFlow, I have a requirement where once I receive request I have log message , after transformation and getting the response from target also I have to log message , how can I do this?


A proxy receives a request, processes it & sends back the response to the client. After this, the proxy enters PostClientFlow.

A PostClientFlow is good for final logging because now the proxy will be having all the details regarding the incoming call & response details from the target.

So a single Message Log policy in PostClientFlow will be sufficient for you to log both request & response details.

Suppose I want to call another proxy (not the target endpoint ) and get the response ,transform this to some format and then sent to target endpoint, In this scenario I want to capture for all the stages where we can log message.

can I use message logging in other places also apart from post client flow.

I am very new to apigee.

How do you plan to call another proxy?

Are you going to use Service Callout policy?

I think we can use Message Logging policy in other places also, but I am sure it will have an impact on the performance. Keeping performance in mind, it is always advisable to use it in PostClientFlow.

Thanks for the confirmation, I am planning to use via Service Callout policy.but to track record for each steps I think it is necessary to keep logging in every step.

Is this possible to overcome performance issue we can run this in separate thread?

Or this there any other mechanism where we can keep track record for each steps ;compromising performance because I guess once proxy will be in production we should have keep track on every steps.

AFAIK there is no need to use Message Logging policy in every step. One Message logging policy in PostClientFlow should be enough to capture logs from all steps.

In the PostClientFlow, the proxy will have access to all the info from all processed steps.

Thanks siddharth your inputs really helped.