Activity log policy
Configure the activity log policy to manage the level of detail of the data stored in API events.
Note: In DataPower API
Gateway and DataPower® Gateway (v5 compatible), use the
When you configure a project in the API Manager user
interface, you use the activity log policy to control the level of detail that is recorded in API event
data. If you use DataPower Nano
Gateway
or webMethods API Gateway, use log invocation policies instead of the
activity log policy. activity log property to specify the data that is stored in
API event records for calls to the API. The activity log property provides separate
settings for successful API calls and failed API calls. The available activity log options are as
follows:Note:
If your gateway is configured to authenticate all API calls with an OAuth provider, the data that is related to the OAuth call is only included in the API event data when the OAuth call fails. Successful OAuth authentication is not recorded in the API event data.
Important: The maximum API event record size is 19 Mb. The analytics
subsystem rejects any API event records that are larger than 19 Mb.
Defining log setting in the API Manager UI
- In the API Manager UI, click API Studio, select the project that you want to work with. If you are not familiar with the API Studio, see Creating, deploying, and publishing APIs using IBM API Studio.
- Locate the policy sequence. Click the
icon next to it.
- From the list of gateways, select DataPower API Gateway or DataPower Gateway (v5 compatible).
- Enter the policy sequence name and click Add.
- From the Outline panel, select Additional settings.
- Click Activity Log and select Enabled.
- Then select the preferred log setting for Success Content and
Error Content:
Defining log setting in source for DataPower API Gateway and DataPower Gateway (v5 compatible)
Use the activity-log extension to configure your logging preferences.
activity-log:
success-content: <success log setting: none, activity, header, payload>
error-content: <failure log setting: none, activity, header, payload>
enabled: <if activity logging is enabled: true or false>Note: If payload logging is enabled, for the gateway to
capture payloads buffering must also be enabled.
Exampleactivity-log:
success-content: <success log setting: none, activity, header, payload>
error-content: <failure log setting: none, activity, header, payload>
enabled: <if activity logging is enabled: true or false>
buffering: true- No logging of successful calls, header logging for failed calls
-
activity-log: success-content: none error-content: header enabled: true - Disable activity logging
-
activity-log: enabled: false