Logging Additional Outbound HTTP Connection Details in the API Gateway

Document ID : KB000012891
Last Modified Date : 07/02/2019
Show Technical Document Details
  • How can I log additional details about outbound HTTP connections such as keep-alive time, connection ID, connection lease/release, etc.?
  1. Add or modify the cluster-wide property (CWP) named log.levels:
    • For versions 9.1 and above- Navigate to Tasks > Global Settings > Manage Cluster-Wide Properties
    • For versions 9.1 and below-  Navigate to Tasks > Manage Cluster-Wide Properties
  2. Change the value to the below and click OK.
    • com.l7tech.common.http.prov.apache.level = FINEST
      com.l7tech.server.policy.assertion.level = FINEST
      httpclient.wire.header.level = FINEST
      httpclient.wire.content.level = FINEST
      org.apache.commons.httpclient.level = FINE
  3. Next you'll have to configure your log sink:
    • For versions 9.1 and above-  Navigate to Tasks > Logging and Auditing > Manage Log/Audit Sinks
    • For versions 9.1 and below-   Navigate to Tasks > Manage Log/Audit Sinks
    1. Edit the desired log sink.
    2. On the Basic Settings tab set the Severity Threshold to All
    3. Next to Filters, click the Add button and select Category=Audits and Category=Gateway Log
    4. Click OK to save the changes.
  4. Now when a policy routes to a backend, the following should be logged (as an example): 5.png
Additional Information:
  • This should not be enabled in production or for long periods of time as this will fill up the logs quickly.
  • Ensure that the CWP named audit.messageThreshold is not set to OFF.