Logging framework

Hi All,

We are planning to develop a logging framework .Have some one already implemented it or is there any sample github code available for it . We are planning to log Header info , payload information and Error information.

0 5 304
5 REPLIES 5

sidd-harth
Participant V

Where are you planning to send/store the logs?

We can make use of Message Logging Policy within Apigee proxy to log various parameters.

Sample code is available in Apigee docs,

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

Thanks for the response. I was able to find out github code .

There are two different options available for you.

  • Via Message Logging Policy
    • Pros:
      • Available in PostClientFlow (as well)
    • Cons:
      • You will end up using either SYSLOG or SYSLOG OVER TLS
      • Scalability is sometimes concerning.
        • Ex: If you try to push logs to an on-prem Splunk/ELK stack.
      • Most of the times, it is difficult to convince security teams.. Especially if you are upto PCI compliance.
  • Via Stackdriver Extension
    • Pros:
      • Utilize the out of extension and use Connector Callout Policy
    • Cons:
      • You have to be on GCP
      • No PostclientFlow support for ConnectorCallOut Policy

Thanks for the response @Dinesh Palanivel. We are using stackdriver for logging . I was able to find a git hub samples for logging framework. We made the necessary changes as per our requirement.

Great. Good to know.